mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 14:04:23 +02:00
allow farGrab module to run when stylus is visible
This commit is contained in:
parent
d6f31369ee
commit
9de1ca4e1a
1 changed files with 9 additions and 6 deletions
|
@ -248,17 +248,20 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.nearGrabWantsToRun = function(controllerData) {
|
this.otherModuleNeedsToRun = function(controllerData) {
|
||||||
var moduleName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay";
|
var grabOverlayModuleName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay";
|
||||||
var module = getEnabledModuleByName(moduleName);
|
var grabOverlayModule = getEnabledModuleByName(grabOverlayModuleName);
|
||||||
var ready = module ? module.isReady(controllerData) : makeRunningValues(false, [], []);
|
var grabOverlayModuleReady = grabOverlayModule ? grabOverlayModule.isReady(controllerData) : makeRunningValues(false, [], []);
|
||||||
return ready.active;
|
var farGrabModuleName = this.hand === RIGHT_HAND ? "RightFarActionGrabEntity" : "LeftFarActionGrabEntity";
|
||||||
|
var farGrabModule = getEnabledModuleByName(farGrabModuleName);
|
||||||
|
var farGrabModuleReady = farGrabModule ? farGrabModule.isReady(controllerData) : makeRunningValues(false, [], []);
|
||||||
|
return grabOverlayModuleReady.active || farGrabModuleReady.active;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.processStylus = function(controllerData) {
|
this.processStylus = function(controllerData) {
|
||||||
this.updateStylusTip();
|
this.updateStylusTip();
|
||||||
|
|
||||||
if (!this.stylusTip.valid || this.overlayLaserActive(controllerData) || this.nearGrabWantsToRun(controllerData)) {
|
if (!this.stylusTip.valid || this.overlayLaserActive(controllerData) || this.otherModuleNeedsToRun(controllerData)) {
|
||||||
this.pointFinger(false);
|
this.pointFinger(false);
|
||||||
this.hideStylus();
|
this.hideStylus();
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue