From 6f76f0cbc04e2a4ba36a361b8ebf43ba779c9ba2 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Thu, 19 Nov 2015 16:22:54 -0800 Subject: [PATCH] release grasp at cleanup --- examples/controllers/handControllerGrab.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/examples/controllers/handControllerGrab.js b/examples/controllers/handControllerGrab.js index abacb819ff..f8a2eeefa5 100644 --- a/examples/controllers/handControllerGrab.js +++ b/examples/controllers/handControllerGrab.js @@ -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) {