From a8b4d1a379a47589b17536bc45f7cd9496d67015 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 31 Mar 2016 13:46:00 -0700 Subject: [PATCH] ray follows controller --- examples/controllers/handControllerGrab.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/controllers/handControllerGrab.js b/examples/controllers/handControllerGrab.js index a2a44e6b41..f1cf1877e6 100644 --- a/examples/controllers/handControllerGrab.js +++ b/examples/controllers/handControllerGrab.js @@ -856,6 +856,7 @@ function MyController(hand) { var controllerHandInput = (this.hand === RIGHT_HAND) ? Controller.Standard.RightHand : Controller.Standard.LeftHand; var currentHandRotation = Controller.getPoseValue(controllerHandInput).rotation; + var currentControllerPosition = Controller.getPoseValue(controllerHandInput).position; var handDeltaRotation = Quat.multiply(currentHandRotation, Quat.inverse(this.startingHandRotation)); var avatarControllerPose = Controller.getPoseValue((this.hand === RIGHT_HAND) ? @@ -871,7 +872,7 @@ function MyController(hand) { }; var searchVisualizationPickRay = { - origin: handPosition, + origin: currentControllerPosition, direction: Quat.getUp(this.getHandRotation()), length: PICK_MAX_DISTANCE };