mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 21:47:09 +02:00
Fix HUD laser while in Create app
This commit is contained in:
parent
4d7b2bb429
commit
209d1535c2
2 changed files with 14 additions and 8 deletions
|
@ -33,7 +33,7 @@
|
|||
this.reticleMinY = MARGIN;
|
||||
this.reticleMaxY;
|
||||
this.parameters = ControllerDispatcherUtils.makeDispatcherModuleParameters(
|
||||
540,
|
||||
160, // Same as webSurfaceLaserInput.
|
||||
this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"],
|
||||
[],
|
||||
100,
|
||||
|
|
|
@ -29,7 +29,7 @@ Script.include("/~/system/libraries/utils.js");
|
|||
this.reticleMaxY;
|
||||
|
||||
this.parameters = makeDispatcherModuleParameters(
|
||||
160,
|
||||
165, // Lower priority than webSurfaceLaserInput and hudOverlayPointer.
|
||||
this.hand === RIGHT_HAND ? ["rightHand", "rightHandEquip", "rightHandTrigger"] : ["leftHand", "leftHandEquip", "leftHandTrigger"],
|
||||
[],
|
||||
100,
|
||||
|
@ -131,18 +131,25 @@ Script.include("/~/system/libraries/utils.js");
|
|||
var tabletStylusInput = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightTabletStylusInput" : "LeftTabletStylusInput");
|
||||
if (tabletStylusInput) {
|
||||
var tabletReady = tabletStylusInput.isReady(controllerData);
|
||||
|
||||
if (tabletReady.active) {
|
||||
return this.exitModule();
|
||||
}
|
||||
}
|
||||
|
||||
var overlayLaser = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightWebSurfaceLaserInput" : "LeftWebSurfaceLaserInput");
|
||||
if (overlayLaser) {
|
||||
var overlayLaserReady = overlayLaser.isReady(controllerData);
|
||||
var webLaser = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightWebSurfaceLaserInput" : "LeftWebSurfaceLaserInput");
|
||||
if (webLaser) {
|
||||
var webLaserReady = webLaser.isReady(controllerData);
|
||||
var target = controllerData.rayPicks[this.hand].objectID;
|
||||
this.sendPointingAtData(controllerData);
|
||||
if (overlayLaserReady.active && this.pointingAtTablet(target)) {
|
||||
if (webLaserReady.active && this.pointingAtTablet(target)) {
|
||||
return this.exitModule();
|
||||
}
|
||||
}
|
||||
|
||||
var hudLaser = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightHudOverlayPointer" : "LeftHudOverlayPointer");
|
||||
if (hudLaser) {
|
||||
var hudLaserReady = hudLaser.isReady(controllerData);
|
||||
if (hudLaserReady.active) {
|
||||
return this.exitModule();
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +157,6 @@ Script.include("/~/system/libraries/utils.js");
|
|||
var nearOverlay = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay");
|
||||
if (nearOverlay) {
|
||||
var nearOverlayReady = nearOverlay.isReady(controllerData);
|
||||
|
||||
if (nearOverlayReady.active && HMD.tabletID && nearOverlay.grabbedThingID === HMD.tabletID) {
|
||||
return this.exitModule();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue