From 3139f5ef2a2b29c4b6e4328b59bf7679256bec54 Mon Sep 17 00:00:00 2001 From: druiz17 Date: Thu, 5 Oct 2017 15:12:58 -0700 Subject: [PATCH] improve mouseHMD exit logic --- scripts/system/controllers/controllerModules/mouseHMD.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/system/controllers/controllerModules/mouseHMD.js b/scripts/system/controllers/controllerModules/mouseHMD.js index ed0bc03223..1d8aeee1f9 100644 --- a/scripts/system/controllers/controllerModules/mouseHMD.js +++ b/scripts/system/controllers/controllerModules/mouseHMD.js @@ -114,8 +114,9 @@ this.run = function(controllerData, deltaTime) { var now = Date.now(); - if (this.mouseActivity.expired(now) || this.triggersPressed(controllerData, now)) { - if (!HMD.active) { + var hmdActive = HMD.active; + if (this.mouseActivity.expired(now) || this.triggersPressed(controllerData, now) || !hmdActive) { + if (!hmdActive) { Reticle.visible = true; } else { Reticle.visible = false;