From d0baa0e303c51d5455342d125973ae6381742911 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 10 Jan 2017 22:03:54 +0000 Subject: [PATCH] home button works with the stylus --- scripts/system/controllers/handControllerGrab.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index 0eae54ca82..b4220cf5b4 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -1220,12 +1220,27 @@ function MyController(hand) { if (this.handleStylusOnWebOverlay(rayPickInfo)) { return; } + this.handleStylusOnHomeButton(rayPickInfo); } } else { this.hideStylus(); } }; + this.handleStylusOnHomeButton = function(rayPickInfo) { + var pointerEvent; + + if (rayPickInfo.entityID) { + var entity = rayPickInfo.entityID; + var name = entityPropertiesCache.getProps(entity).name; + if (name == "homeButton") { + Messages.sendLocalMessage("home", entity); + //this.grabbedEntity = entity; + //this.setState(STATE_ENTITY_STYLUS_TOUCHING, "begin touching entity '" + name + "'"); + } + } + }; + this.clearEquipHaptics = function() { this.prevPotentialEquipHotspot = null; };