diff --git a/examples/controllers/handControllerGrab.js b/examples/controllers/handControllerGrab.js index 272c2903af..287f57ca30 100644 --- a/examples/controllers/handControllerGrab.js +++ b/examples/controllers/handControllerGrab.js @@ -1266,10 +1266,10 @@ Controller.enableMapping(MAPPING_NAME); var handToDisable = 'none'; function update() { - if (handToDisable !== LEFT_HAND) { + if (handToDisable !== LEFT_HAND && handToDisable!=='both') { leftController.update(); } - if (handToDisable !== RIGHT_HAND) { + if (handToDisable !== RIGHT_HAND && handToDisable!=='both') { rightController.update(); } } @@ -1279,13 +1279,18 @@ Messages.subscribe('Hifi-Hand-Disabler'); handleHandDisablerMessages = function(channel, message, sender) { if (sender === MyAvatar.sessionUUID) { - handToDisable = message; if (message === 'left') { handToDisable = LEFT_HAND; } if (message === 'right') { handToDisable = RIGHT_HAND; } + if(message==='both'){ + handToDisable='both'; + } + if(message==='none'){ + handToDisable='none'; + } } }