improve mouseHMD exit logic

This commit is contained in:
druiz17 2017-10-05 15:12:58 -07:00
parent ba50fcc509
commit 3139f5ef2a

View file

@ -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;