mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:17:40 +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.reticleMinY = MARGIN;
|
||||||
this.reticleMaxY;
|
this.reticleMaxY;
|
||||||
this.parameters = ControllerDispatcherUtils.makeDispatcherModuleParameters(
|
this.parameters = ControllerDispatcherUtils.makeDispatcherModuleParameters(
|
||||||
540,
|
160, // Same as webSurfaceLaserInput.
|
||||||
this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"],
|
this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"],
|
||||||
[],
|
[],
|
||||||
100,
|
100,
|
||||||
|
|
|
@ -29,7 +29,7 @@ Script.include("/~/system/libraries/utils.js");
|
||||||
this.reticleMaxY;
|
this.reticleMaxY;
|
||||||
|
|
||||||
this.parameters = makeDispatcherModuleParameters(
|
this.parameters = makeDispatcherModuleParameters(
|
||||||
160,
|
165, // Lower priority than webSurfaceLaserInput and hudOverlayPointer.
|
||||||
this.hand === RIGHT_HAND ? ["rightHand", "rightHandEquip", "rightHandTrigger"] : ["leftHand", "leftHandEquip", "leftHandTrigger"],
|
this.hand === RIGHT_HAND ? ["rightHand", "rightHandEquip", "rightHandTrigger"] : ["leftHand", "leftHandEquip", "leftHandTrigger"],
|
||||||
[],
|
[],
|
||||||
100,
|
100,
|
||||||
|
@ -131,18 +131,25 @@ Script.include("/~/system/libraries/utils.js");
|
||||||
var tabletStylusInput = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightTabletStylusInput" : "LeftTabletStylusInput");
|
var tabletStylusInput = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightTabletStylusInput" : "LeftTabletStylusInput");
|
||||||
if (tabletStylusInput) {
|
if (tabletStylusInput) {
|
||||||
var tabletReady = tabletStylusInput.isReady(controllerData);
|
var tabletReady = tabletStylusInput.isReady(controllerData);
|
||||||
|
|
||||||
if (tabletReady.active) {
|
if (tabletReady.active) {
|
||||||
return this.exitModule();
|
return this.exitModule();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var overlayLaser = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightWebSurfaceLaserInput" : "LeftWebSurfaceLaserInput");
|
var webLaser = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightWebSurfaceLaserInput" : "LeftWebSurfaceLaserInput");
|
||||||
if (overlayLaser) {
|
if (webLaser) {
|
||||||
var overlayLaserReady = overlayLaser.isReady(controllerData);
|
var webLaserReady = webLaser.isReady(controllerData);
|
||||||
var target = controllerData.rayPicks[this.hand].objectID;
|
var target = controllerData.rayPicks[this.hand].objectID;
|
||||||
this.sendPointingAtData(controllerData);
|
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();
|
return this.exitModule();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,7 +157,6 @@ Script.include("/~/system/libraries/utils.js");
|
||||||
var nearOverlay = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay");
|
var nearOverlay = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay");
|
||||||
if (nearOverlay) {
|
if (nearOverlay) {
|
||||||
var nearOverlayReady = nearOverlay.isReady(controllerData);
|
var nearOverlayReady = nearOverlay.isReady(controllerData);
|
||||||
|
|
||||||
if (nearOverlayReady.active && HMD.tabletID && nearOverlay.grabbedThingID === HMD.tabletID) {
|
if (nearOverlayReady.active && HMD.tabletID && nearOverlay.grabbedThingID === HMD.tabletID) {
|
||||||
return this.exitModule();
|
return this.exitModule();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue