mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:23:55 +02:00
adjust when stylus input is active
This commit is contained in:
parent
4f7252a0d8
commit
07034721c7
3 changed files with 5 additions and 10 deletions
|
@ -52,10 +52,6 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
this.disable = false;
|
this.disable = false;
|
||||||
|
|
||||||
this.otherModuleNeedsToRun = function(controllerData) {
|
this.otherModuleNeedsToRun = function(controllerData) {
|
||||||
// var grabOverlayModuleName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay";
|
|
||||||
// var grabOverlayModule = getEnabledModuleByName(grabOverlayModuleName);
|
|
||||||
// var grabOverlayModuleReady = grabOverlayModule ? grabOverlayModule.isReady(controllerData) : makeRunningValues(false, [], []);
|
|
||||||
|
|
||||||
var grabEntityModuleName = this.hand === RIGHT_HAND ? "RightNearGrabEntity" : "LeftNearGrabEntity";
|
var grabEntityModuleName = this.hand === RIGHT_HAND ? "RightNearGrabEntity" : "LeftNearGrabEntity";
|
||||||
var grabEntityModule = getEnabledModuleByName(grabEntityModuleName);
|
var grabEntityModule = getEnabledModuleByName(grabEntityModuleName);
|
||||||
var grabEntityModuleReady = grabEntityModule ? grabEntityModule.isReady(controllerData) : makeRunningValues(false, [], []);
|
var grabEntityModuleReady = grabEntityModule ? grabEntityModule.isReady(controllerData) : makeRunningValues(false, [], []);
|
||||||
|
@ -70,8 +66,7 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
var nearTabletHighlightModuleReady = nearTabletHighlightModule ?
|
var nearTabletHighlightModuleReady = nearTabletHighlightModule ?
|
||||||
nearTabletHighlightModule.isReady(controllerData) : makeRunningValues(false, [], []);
|
nearTabletHighlightModule.isReady(controllerData) : makeRunningValues(false, [], []);
|
||||||
|
|
||||||
return /* grabOverlayModuleReady.active || */ farGrabModuleReady.active || grabEntityModuleReady.active
|
return farGrabModuleReady.active || grabEntityModuleReady.active;
|
||||||
/* || nearTabletHighlightModuleReady.active */ ;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.overlayLaserActive = function(controllerData) {
|
this.overlayLaserActive = function(controllerData) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
this.gestureCompleted = true;
|
this.gestureCompleted = true;
|
||||||
} else if (leftTipDistance > this.touchOffAboveDistance || rightTipDistance > this.touchOffAboveDistance) {
|
} else if (leftTipDistance > this.touchOffAboveDistance || rightTipDistance > this.touchOffAboveDistance) {
|
||||||
this.gestureCompleted = false;
|
this.gestureCompleted = false;
|
||||||
}
|
} // else don't change gestureCompleted
|
||||||
} else {
|
} else {
|
||||||
this.gestureCompleted = false;
|
this.gestureCompleted = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
this.controlPoint = this.getControlPoint();
|
this.controlPoint = this.getControlPoint();
|
||||||
} else if (this.walkingForward && indexTipDistance > this.touchOffAboveDistance) {
|
} else if (this.walkingForward && indexTipDistance > this.touchOffAboveDistance) {
|
||||||
this.walkingForward = false;
|
this.walkingForward = false;
|
||||||
}
|
} // else don't change walkingForward
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.leftThumbPos && this.rightThumbPos) {
|
if (this.leftThumbPos && this.rightThumbPos) {
|
||||||
|
@ -56,7 +56,7 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
this.controlPoint = this.getControlPoint();
|
this.controlPoint = this.getControlPoint();
|
||||||
} else if (this.walkingBackward && thumbTipDistance > this.touchOffAboveDistance) {
|
} else if (this.walkingBackward && thumbTipDistance > this.touchOffAboveDistance) {
|
||||||
this.walkingBackward = false;
|
this.walkingBackward = false;
|
||||||
}
|
} // else don't change this.walkingBackward
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this.walkingForward || this.walkingBackward) && !this.mappingEnabled) {
|
if ((this.walkingForward || this.walkingBackward) && !this.mappingEnabled) {
|
||||||
|
@ -65,7 +65,7 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
} else if (!(this.walkingForward || this.walkingBackward) && this.mappingEnabled) {
|
} else if (!(this.walkingForward || this.walkingBackward) && this.mappingEnabled) {
|
||||||
this.inputMapping.disable();
|
this.inputMapping.disable();
|
||||||
this.mappingEnabled = false;
|
this.mappingEnabled = false;
|
||||||
}
|
} // else don't change mappingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
this.leftIndexChanged = function (pose) {
|
this.leftIndexChanged = function (pose) {
|
||||||
|
|
Loading…
Reference in a new issue