mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 02:03:57 +02:00
Add disabling of right click menu with vive
This commit is contained in:
parent
eb195e2fb8
commit
a4ffa7b23f
2 changed files with 26 additions and 10 deletions
|
@ -363,7 +363,7 @@ function makeToggleAction(hand) { // return a function(0|1) that makes the speci
|
|||
};
|
||||
}
|
||||
|
||||
var clickMapping = Controller.newMapping(Script.resolvePath('') + '-click');
|
||||
var clickMapping = Controller.newMapping('handControllerPointer-click');
|
||||
Script.scriptEnding.connect(clickMapping.disable);
|
||||
|
||||
// Gather the trigger data for smoothing.
|
||||
|
|
|
@ -837,18 +837,34 @@ function stopTutorial() {
|
|||
|
||||
startTutorial();
|
||||
|
||||
var DISABLE_SPIN_MAPPING = "com.highfidelity.spin.disable";
|
||||
var mapping = Controller.newMapping(DISABLE_SPIN_MAPPING);
|
||||
function noop(value) { }
|
||||
mapping.from([Controller.Standard.RY]).to(noop);
|
||||
var TUTORIAL_DISABLE_MAPPING = "com.highfidelity.tutorial.disable";
|
||||
var mapping = Controller.newMapping(TUTORIAL_DISABLE_MAPPING);
|
||||
|
||||
function noop(value) {
|
||||
print("NOOP");
|
||||
}
|
||||
|
||||
mapping.from([
|
||||
Controller.Vive.LSCenter,
|
||||
Controller.Vive.LeftApplicationMenu,
|
||||
Controller.Standard.LeftSecondaryThumb,
|
||||
Controller.Standard.LeftPrimraryThumb
|
||||
]).to(noop);
|
||||
mapping.from([]).to(noop);
|
||||
mapping.from([]).to(noop);
|
||||
|
||||
Controller.enableMapping(TUTORIAL_DISABLE_MAPPING);
|
||||
|
||||
Script.scriptEnding.connect(function() {
|
||||
Controller.disableMapping(TUTORIAL_DISABLE_MAPPING);
|
||||
});
|
||||
Controller.disableMapping('handControllerPointer-click');
|
||||
|
||||
//mapping.from([Controller.Standard.RY]).to(noop);
|
||||
//{ "from": "Vive.LeftApplicationMenu", "to": "Standard.LeftSecondaryThumb" },
|
||||
//mapping.from([Controller.Standard.RY]).when("Controller.Application.Grounded").to(noop);
|
||||
//mapping.from([Controller.Standard.RY]).when(Controller.Application.Grounded).to(noop);
|
||||
|
||||
Controller.enableMapping(DISABLE_SPIN_MAPPING);
|
||||
|
||||
Script.scriptEnding.connect(function() {
|
||||
Controller.disableMapping(DISABLE_SPIN_MAPPING);
|
||||
});
|
||||
|
||||
Script.scriptEnding.connect(stopTutorial);
|
||||
|
||||
|
|
Loading…
Reference in a new issue