adjust when stylus input is active

This commit is contained in:
Seth Alves 2019-11-04 10:18:09 -08:00
parent 4f7252a0d8
commit 07034721c7
3 changed files with 5 additions and 10 deletions

View file

@ -52,10 +52,6 @@ Script.include("/~/system/libraries/controllers.js");
this.disable = false;
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 grabEntityModule = getEnabledModuleByName(grabEntityModuleName);
var grabEntityModuleReady = grabEntityModule ? grabEntityModule.isReady(controllerData) : makeRunningValues(false, [], []);
@ -70,8 +66,7 @@ Script.include("/~/system/libraries/controllers.js");
var nearTabletHighlightModuleReady = nearTabletHighlightModule ?
nearTabletHighlightModule.isReady(controllerData) : makeRunningValues(false, [], []);
return /* grabOverlayModuleReady.active || */ farGrabModuleReady.active || grabEntityModuleReady.active
/* || nearTabletHighlightModuleReady.active */ ;
return farGrabModuleReady.active || grabEntityModuleReady.active;
};
this.overlayLaserActive = function(controllerData) {

View file

@ -39,7 +39,7 @@ Script.include("/~/system/libraries/controllers.js");
this.gestureCompleted = true;
} else if (leftTipDistance > this.touchOffAboveDistance || rightTipDistance > this.touchOffAboveDistance) {
this.gestureCompleted = false;
}
} // else don't change gestureCompleted
} else {
this.gestureCompleted = false;
}

View file

@ -46,7 +46,7 @@ Script.include("/~/system/libraries/controllers.js");
this.controlPoint = this.getControlPoint();
} else if (this.walkingForward && indexTipDistance > this.touchOffAboveDistance) {
this.walkingForward = false;
}
} // else don't change walkingForward
}
if (this.leftThumbPos && this.rightThumbPos) {
@ -56,7 +56,7 @@ Script.include("/~/system/libraries/controllers.js");
this.controlPoint = this.getControlPoint();
} else if (this.walkingBackward && thumbTipDistance > this.touchOffAboveDistance) {
this.walkingBackward = false;
}
} // else don't change this.walkingBackward
}
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) {
this.inputMapping.disable();
this.mappingEnabled = false;
}
} // else don't change mappingEnabled
};
this.leftIndexChanged = function (pose) {