20 lines
734 B
JavaScript
20 lines
734 B
JavaScript
// Script written by Thoys, mainly for fun , feel free to use it for anything
|
|
(function() {
|
|
function unsetAttachments() {
|
|
var currentAttachments = MyAvatar.getAttachmentsVariant();
|
|
var newAttachments = [];
|
|
currentAttachments.forEach(function(attachment) {
|
|
if (attachment.jointName !== 'LeftHand' && attachment.jointName !== 'RightHand') {
|
|
newAttachments.push(attachment);
|
|
}
|
|
});
|
|
MyAvatar.setAttachmentsVariant(newAttachments);
|
|
}
|
|
|
|
this.startNearTrigger = function(entityID, args) {
|
|
unsetAttachments();
|
|
};
|
|
this.clickReleaseOnEntity = function(entityID, mouseEvent) {
|
|
unsetAttachments();
|
|
};
|
|
})
|