diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index 150efea00f..0cf33f3d53 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -63,6 +63,7 @@ var EQUIP_SPHERE_SCALE_FACTOR = 0.65; var WEB_DISPLAY_STYLUS_DISTANCE = 0.5; var WEB_STYLUS_LENGTH = 0.2; var WEB_TOUCH_Y_OFFSET = 0.05; // how far forward (or back with a negative number) to slide stylus in hand +var WEB_TOUCH_TOO_CLOSE = 0.04; // if the stylus is pushed far though the web surface, don't consider it touching // // distant manipulation @@ -1170,7 +1171,8 @@ function MyController(hand) { if (nearWeb) { this.showStylus(); var rayPickInfo = this.calcRayPickInfo(this.hand); - if (rayPickInfo.distance < WEB_STYLUS_LENGTH / 2.0 + WEB_TOUCH_Y_OFFSET) { + if (rayPickInfo.distance < WEB_STYLUS_LENGTH / 2.0 + WEB_TOUCH_Y_OFFSET && + rayPickInfo.distance > WEB_STYLUS_LENGTH / 2.0 + WEB_TOUCH_TOO_CLOSE) { this.handleStylusOnHomeButton(rayPickInfo); if (this.handleStylusOnWebEntity(rayPickInfo)) { return; diff --git a/scripts/system/tablet-ui/HomeButton.js b/scripts/system/tablet-ui/HomeButton.js deleted file mode 100644 index 02748020c0..0000000000 --- a/scripts/system/tablet-ui/HomeButton.js +++ /dev/null @@ -1,32 +0,0 @@ -// -// HomeButton.js -// -// Created by Dante Ruiz on 12/6/2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -(function(){ - _this = this; - - this.preload = function(entityID) { - print(entityID); - this.entityID = entityID; - } - - this.clickDownOnEntity = function(entityID, mouseEvent) { - Messages.sendLocalMessage("home", _this.entityID); - } - - this.startNearTrigger = function() { - Messages.sendLocalMessage("home", _this.entityID); - } - - - this.startFarTrigger = function() { - Messages.sendLocalMessage("home", _this.entityID); - } - -});