Make handControllerGrab independent of whether we're using laser or

Reticle.
This commit is contained in:
howard-stearns 2016-06-13 17:13:10 -07:00
parent 0366c891cc
commit 526fc7d062

View file

@ -300,7 +300,10 @@ function propsArePhysical(props) {
// and we should not be showing lasers when someone else is using the Reticle to indicate a 2D minor mode.
var EXTERNALLY_MANAGED_2D_MINOR_MODE = true;
function isIn2DMode() {
return EXTERNALLY_MANAGED_2D_MINOR_MODE && Reticle.visible;
// In this version, we make our own determination of whether we're aimed a HUD element,
// because other scripts (such as handControllerPointer) might be using some other visualization
// instead of setting Reticle.visible.
return EXTERNALLY_MANAGED_2D_MINOR_MODE && (Reticle.pointingAtSystemOverlay || Overlays.getOverlayAtPoint(Reticle.position));
}
function restore2DMode() {
if (!EXTERNALLY_MANAGED_2D_MINOR_MODE) {