From acb04a0bc93cff6821ed822581dfc2a8f8d0d8a0 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 25 Aug 2016 19:09:10 -0700 Subject: [PATCH] don't add children of controller joints until we know our avatar ID --- scripts/system/controllers/handControllerGrab.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index 4834d533f5..bd04975545 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -829,16 +829,17 @@ function MyController(hand) { } }; - this.grabPointSphereOn = function() { if (!SHOW_GRAB_POINT_SPHERE) { return; } + if (!MyAvatar.sessionUUID) { + return; + } if (!this.grabPointSphere) { - var controllerLocation = this.getControllerLocation(); this.grabPointSphere = Overlays.addOverlay("sphere", { - position: controllerLocation.position, - rotation: { x: 0, y: 0, z: 0, w: 1 }, + localPosition: GRAB_POINT_SPHERE_OFFSET, + localRotation: { x: 0, y: 0, z: 0, w: 1 }, dimensions: GRAB_POINT_SPHERE_RADIUS, color: GRAB_POINT_SPHERE_COLOR, alpha: GRAB_POINT_SPHERE_ALPHA,