From 0d4ac4387aa8c3e3e309eebb9c2e2ec48c30dada Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Thu, 31 Dec 2015 11:46:35 -0800 Subject: [PATCH] Show hand-sphere search line and point just with hand direction again --- examples/controllers/handControllerGrab.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/controllers/handControllerGrab.js b/examples/controllers/handControllerGrab.js index 8af8731c8d..e747bb0897 100644 --- a/examples/controllers/handControllerGrab.js +++ b/examples/controllers/handControllerGrab.js @@ -789,7 +789,8 @@ function MyController(hand) { var distantPickRay = { origin: Camera.position, - direction: Quat.getFront(Quat.multiply(Camera.orientation, handDeltaRotation)), + //direction: Quat.getFront(Quat.multiply(Camera.orientation, handDeltaRotation)), + direction: Quat.getUp(this.getHandRotation()), length: PICK_MAX_DISTANCE }; @@ -1022,9 +1023,7 @@ function MyController(hand) { searchSphereLocation.y -= ((this.intersectionDistance - this.searchSphereDistance) / this.intersectionDistance) * SEARCH_SPHERE_CHASE_DROP; this.searchSphereOn(searchSphereLocation, SPHERE_INTERSECTION_SIZE * this.intersectionDistance, this.triggerSmoothedGrab() ? INTERSECT_COLOR : NO_INTERSECT_COLOR); if (USE_OVERLAY_LINES_FOR_SEARCHING === true) { - var OVERLAY_BEAM_SETBACK = 0.9; - var startBeam = Vec3.sum(handPosition, Vec3.multiply(Vec3.subtract(searchSphereLocation, handPosition), OVERLAY_BEAM_SETBACK)); - this.overlayLineOn(startBeam, searchSphereLocation, this.triggerSmoothedGrab() ? INTERSECT_COLOR : NO_INTERSECT_COLOR); + this.overlayLineOn(handPosition, searchSphereLocation, this.triggerSmoothedGrab() ? INTERSECT_COLOR : NO_INTERSECT_COLOR); } } };