Fix non-dominant hand ciursor dot showing when it shouldn't

This commit is contained in:
David Rowe 2017-07-28 09:20:21 +12:00
parent 52bb4a0f77
commit 01f37b53e9

View file

@ -182,7 +182,7 @@ Laser = function (side) {
isLaserOn = true; isLaserOn = true;
display(pickRay.origin, pickRay.direction, laserLength, true, hand.triggerClicked()); display(pickRay.origin, pickRay.direction, laserLength, true, hand.triggerClicked());
} else { } else if (uiEntityIDs.length > 0) {
// Special UI cursor. // Special UI cursor.
intersection = Overlays.findRayIntersection(pickRay, PRECISION_PICKING, uiEntityIDs, NO_EXCLUDE_IDS, intersection = Overlays.findRayIntersection(pickRay, PRECISION_PICKING, uiEntityIDs, NO_EXCLUDE_IDS,
@ -198,18 +198,20 @@ Laser = function (side) {
} }
isLaserOn = true; isLaserOn = true;
display(pickRay.origin, pickRay.direction, laserLength, false, false); display(pickRay.origin, pickRay.direction, laserLength, false, false);
} else { } else if (isLaserOn) {
if (isLaserOn) { isLaserOn = false;
isLaserOn = false; hide();
hide();
}
} }
} else {
intersection = { intersects: false };
if (isLaserOn) {
isLaserOn = false;
hide();
}
} }
} else { } else {
intersection = { intersection = { intersects: false };
intersects: false
};
if (isLaserOn) { if (isLaserOn) {
isLaserOn = false; isLaserOn = false;
hide(); hide();