Merge pull request #13366 from danteruiz/fixing-invisible-cursor

fixing invisible cursor when coming from HMD mode
This commit is contained in:
Seth Alves 2018-06-15 17:16:46 -07:00 committed by GitHub
commit b4b6c85aaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,12 +101,15 @@
this.isReady = function(controllerData, deltaTime) {
var now = Date.now();
this.triggersPressed(controllerData, now);
if ((HMD.active && !this.mouseActivity.expired(now)) && _this.handControllerActivity.expired()) {
Reticle.visible = true;
return ControllerDispatcherUtils.makeRunningValues(true, [], []);
}
if (HMD.active) {
Reticle.visible = false;
if (!this.mouseActivity.expired(now) && _this.handControllerActivity.expired()) {
Reticle.visible = true;
return ControllerDispatcherUtils.makeRunningValues(true, [], []);
} else {
Reticle.visible = false;
}
} else if (!Reticle.visible) {
Reticle.visible = true;
}
return ControllerDispatcherUtils.makeRunningValues(false, [], []);