release grasp at cleanup

This commit is contained in:
James B. Pollack 2015-11-19 16:22:54 -08:00
parent 3f89d73fc6
commit 6f76f0cbc0

View file

@ -200,13 +200,6 @@ function entityIsGrabbedByOther(entityID) {
return false;
}
//make sure to clean this up when the script ends so we don't get stuck.
Script.scriptEnding.connect(function() {
MyController.endHandGrasp();
})
function MyController(hand) {
this.hand = hand;
if (this.hand === RIGHT_HAND) {
@ -1122,6 +1115,7 @@ function MyController(hand) {
this.cleanup = function() {
this.release();
this.endHandGrasp();
};
this.activateEntity = function(entityID, grabbedProperties) {