Merge pull request #11535 from druiz17/mouse-disapears

Fix mouse disappearing when switching to desktop mode from HMD
This commit is contained in:
Seth Alves 2017-10-05 16:03:20 -07:00 committed by GitHub
commit 76d5d13914

View file

@ -114,8 +114,14 @@
this.run = function(controllerData, deltaTime) {
var now = Date.now();
if (this.mouseActivity.expired(now) || this.triggersPressed(controllerData, now)) {
Reticle.visible = false;
var hmdActive = HMD.active;
if (this.mouseActivity.expired(now) || this.triggersPressed(controllerData, now) || !hmdActive) {
if (!hmdActive) {
Reticle.visible = true;
} else {
Reticle.visible = false;
}
return ControllerDispatcherUtils.makeRunningValues(false, [], []);
}
this.adjustReticleDepth(controllerData);