From c93d83daddec7832e2ee4ad654ff82d14bbbb456 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 10 Jan 2017 16:41:07 -0800 Subject: [PATCH] update lasers when distance-scrolling a web entity/overlay --- scripts/system/controllers/handControllerGrab.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index 147fd2adf6..fd47b2db70 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -2728,13 +2728,17 @@ function MyController(hand) { var POINTER_PRESS_TO_MOVE_DELAY = 0.15; // seconds var POINTER_PRESS_TO_MOVE_DEADSPOT_ANGLE = 0.05; // radians ~ 3 degrees if (this.deadspotExpired || this.touchingEnterTimer > POINTER_PRESS_TO_MOVE_DELAY || - angleBetween(pointerEvent.direction, this.touchingEnterPointerEvent.direction) > POINTER_PRESS_TO_MOVE_DEADSPOT_ANGLE) { + angleBetween(pointerEvent.direction, + this.touchingEnterPointerEvent.direction) > POINTER_PRESS_TO_MOVE_DEADSPOT_ANGLE) { Entities.sendMouseMoveOnEntity(this.grabbedEntity, pointerEvent); Entities.sendHoldingClickOnEntity(this.grabbedEntity, pointerEvent); this.deadspotExpired = true; } this.intersectionDistance = intersectInfo.distance; + if (this.state == STATE_ENTITY_LASER_TOUCHING) { + this.searchIndicatorOn(intersectInfo.searchRay); + } Reticle.setVisible(false); } else { this.setState(STATE_OFF, "grabbed entity was destroyed"); @@ -2845,6 +2849,9 @@ function MyController(hand) { } this.intersectionDistance = intersectInfo.distance; + if (this.state == STATE_OVERLAY_LASER_TOUCHING) { + this.searchIndicatorOn(intersectInfo.searchRay); + } Reticle.setVisible(false); } else { this.setState(STATE_OFF, "grabbed overlay was destroyed");