mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 04:24:47 +02:00
Merge pull request #11562 from druiz17/fix-release-grab
include release message to controller modules
This commit is contained in:
commit
fe9f142bf6
4 changed files with 23 additions and 0 deletions
|
@ -546,6 +546,12 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa
|
||||||
var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
|
var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
|
||||||
Entities.callEntityMethod(this.targetEntityID, "releaseEquip", args);
|
Entities.callEntityMethod(this.targetEntityID, "releaseEquip", args);
|
||||||
|
|
||||||
|
Messages.sendMessage('Hifi-Object-Manipulation', JSON.stringify({
|
||||||
|
action: 'release',
|
||||||
|
grabbedEntity: this.targetEntityID,
|
||||||
|
joint: this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"
|
||||||
|
}));
|
||||||
|
|
||||||
ensureDynamic(this.targetEntityID);
|
ensureDynamic(this.targetEntityID);
|
||||||
this.targetEntityID = null;
|
this.targetEntityID = null;
|
||||||
this.messageGrabEntity = false;
|
this.messageGrabEntity = false;
|
||||||
|
|
|
@ -144,6 +144,12 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
|
||||||
Entities.deleteAction(this.targetEntityID, this.actionID);
|
Entities.deleteAction(this.targetEntityID, this.actionID);
|
||||||
this.actionID = null;
|
this.actionID = null;
|
||||||
|
|
||||||
|
Messages.sendMessage('Hifi-Object-Manipulation', JSON.stringify({
|
||||||
|
action: 'release',
|
||||||
|
grabbedEntity: this.targetEntityID,
|
||||||
|
joint: this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"
|
||||||
|
}));
|
||||||
|
|
||||||
this.targetEntityID = null;
|
this.targetEntityID = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,11 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
|
||||||
|
|
||||||
var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
|
var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
|
||||||
Entities.callEntityMethod(this.targetEntityID, "releaseGrab", args);
|
Entities.callEntityMethod(this.targetEntityID, "releaseGrab", args);
|
||||||
|
Messages.sendMessage('Hifi-Object-Manipulation', JSON.stringify({
|
||||||
|
action: 'release',
|
||||||
|
grabbedEntity: this.targetEntityID,
|
||||||
|
joint: this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"
|
||||||
|
}));
|
||||||
this.grabbing = false;
|
this.grabbing = false;
|
||||||
this.targetEntityID = null;
|
this.targetEntityID = null;
|
||||||
};
|
};
|
||||||
|
|
|
@ -148,6 +148,12 @@ Script.include("/~/system/libraries/utils.js");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Messages.sendMessage('Hifi-Object-Manipulation', JSON.stringify({
|
||||||
|
action: 'release',
|
||||||
|
grabbedEntity: this.grabbedThingID,
|
||||||
|
joint: this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"
|
||||||
|
}));
|
||||||
|
|
||||||
this.grabbedThingID = null;
|
this.grabbedThingID = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue