From 01f37b53e955472a0e94b3a5ce0d090ed59679fb Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 28 Jul 2017 09:20:21 +1200 Subject: [PATCH] Fix non-dominant hand ciursor dot showing when it shouldn't --- scripts/vr-edit/modules/laser.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/vr-edit/modules/laser.js b/scripts/vr-edit/modules/laser.js index 5ef0a223cf..fefa13b8ff 100644 --- a/scripts/vr-edit/modules/laser.js +++ b/scripts/vr-edit/modules/laser.js @@ -182,7 +182,7 @@ Laser = function (side) { isLaserOn = true; display(pickRay.origin, pickRay.direction, laserLength, true, hand.triggerClicked()); - } else { + } else if (uiEntityIDs.length > 0) { // Special UI cursor. intersection = Overlays.findRayIntersection(pickRay, PRECISION_PICKING, uiEntityIDs, NO_EXCLUDE_IDS, @@ -198,18 +198,20 @@ Laser = function (side) { } isLaserOn = true; display(pickRay.origin, pickRay.direction, laserLength, false, false); - } else { - if (isLaserOn) { - isLaserOn = false; - hide(); - } + } else if (isLaserOn) { + isLaserOn = false; + hide(); } + } else { + intersection = { intersects: false }; + if (isLaserOn) { + isLaserOn = false; + hide(); + } } } else { - intersection = { - intersects: false - }; + intersection = { intersects: false }; if (isLaserOn) { isLaserOn = false; hide();