From 07079ad78dfd04a5e8009288b23459af1f1c8019 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Sat, 7 Jan 2017 00:22:55 +0000 Subject: [PATCH] fixed bug --- scripts/system/controllers/handControllerPointer.js | 2 ++ scripts/system/libraries/WebTablet.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/handControllerPointer.js b/scripts/system/controllers/handControllerPointer.js index 62c0f62212..426980d015 100644 --- a/scripts/system/controllers/handControllerPointer.js +++ b/scripts/system/controllers/handControllerPointer.js @@ -469,6 +469,7 @@ clickMapping.from(Controller.Standard.LeftSecondaryThumb).peek().to(function (cl clickMapping.from(Controller.Standard.Start).peek().to(function (clicked) { if (clicked) { activeHudPoint2dGamePad(); + Messages.sendLocalMessage("toggleHand", -1); } wantsMenu = clicked; @@ -480,6 +481,7 @@ clickMapping.from(Controller.Hardware.Keyboard.RightMouseClicked).peek().to(func // We don't want the system code to always do this for us, because, e.g., we do not want to get a mouseMove // after the Left/RightSecondaryThumb gives us a context menu. Only from the mouse. Script.setTimeout(function () { + Messages.sendLocalMessage("toggleHand", -1); Reticle.setPosition(Reticle.position); }, 0); }); diff --git a/scripts/system/libraries/WebTablet.js b/scripts/system/libraries/WebTablet.js index 8fba2590cc..85f207d984 100644 --- a/scripts/system/libraries/WebTablet.js +++ b/scripts/system/libraries/WebTablet.js @@ -22,7 +22,7 @@ var TABLET_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/Tablet-Model-v1- // * position - position in front of the user // * rotation - rotation of entity so it faces the user. function calcSpawnInfo(hand) { - if (HMD.active && hand) { + if (HMD.active && hand > 0) { var handController = getControllerWorldLocation(hand, false); var front = Quat.getFront(handController.orientation); var up = Quat.getUp(handController.orientation);