mirror of
https://github.com/overte-org/overte.git
synced 2025-06-06 16:22:25 +02:00
Adding fix for enabling saved front/back advanced controls.
This commit is contained in:
parent
cacc102fd0
commit
720b0a8963
1 changed files with 20 additions and 0 deletions
|
@ -171,4 +171,24 @@
|
||||||
Messages.subscribe(HIFI_ADVANCED_MOVEMENT_DISABLER_CHANNEL);
|
Messages.subscribe(HIFI_ADVANCED_MOVEMENT_DISABLER_CHANNEL);
|
||||||
Messages.messageReceived.connect(handleMessage);
|
Messages.messageReceived.connect(handleMessage);
|
||||||
|
|
||||||
|
function initializeControls() {
|
||||||
|
if(HMD.active) {
|
||||||
|
if (Controller.Hardware.Vive !== undefined || Controller.Hardware.OculusTouch !== undefined) {
|
||||||
|
if (MyAvatar.useAdvancedMovementControls) {
|
||||||
|
Controller.disableMapping(DRIVING_MAPPING_NAME);
|
||||||
|
} else {
|
||||||
|
Controller.enableMapping(DRIVING_MAPPING_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MyAvatar.getFlyingEnabled()) {
|
||||||
|
Controller.disableMapping(FLYING_MAPPING_NAME);
|
||||||
|
} else {
|
||||||
|
Controller.enableMapping(FLYING_MAPPING_NAME);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
initializeControls();
|
||||||
}()); // END LOCAL_SCOPE
|
}()); // END LOCAL_SCOPE
|
||||||
|
|
Loading…
Reference in a new issue