mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 04:03:59 +02:00
CR feedback
This commit is contained in:
parent
9aaef9aabd
commit
060f87d14a
1 changed files with 5 additions and 3 deletions
|
@ -867,10 +867,12 @@ function MyController(hand, triggerAction) {
|
|||
var rightController = new MyController(RIGHT_HAND, Controller.Standard.RT);
|
||||
var leftController = new MyController(LEFT_HAND, Controller.Standard.LT);
|
||||
|
||||
var mapping = Controller.newMapping("com.highfidelity.handControllerGrab");
|
||||
var MAPPING_NAME = "com.highfidelity.handControllerGrab";
|
||||
|
||||
var mapping = Controller.newMapping(MAPPING_NAME);
|
||||
mapping.from([Controller.Standard.RB, Controller.Standard.RT]).to(rightController.eitherTrigger);
|
||||
mapping.from([Controller.Standard.LB, Controller.Standard.LT]).to(leftController.eitherTrigger);
|
||||
Controller.enableMapping("com.highfidelity.handControllerGrab");
|
||||
Controller.enableMapping(MAPPING_NAME);
|
||||
|
||||
|
||||
function update() {
|
||||
|
@ -881,7 +883,7 @@ function update() {
|
|||
function cleanup() {
|
||||
rightController.cleanup();
|
||||
leftController.cleanup();
|
||||
Controller.disableMapping("com.highfidelity.handControllerGrab");
|
||||
Controller.disableMapping(MAPPING_NAME);
|
||||
}
|
||||
|
||||
Script.scriptEnding.connect(cleanup);
|
||||
|
|
Loading…
Reference in a new issue