mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 20:52:11 +02:00
Merge pull request #13238 from wayne-chen/toggleAdvancedModeHMD-case-15324
Forward and backward on HMD controllers don't work after restarting interface
This commit is contained in:
commit
155d6f87c4
1 changed files with 21 additions and 0 deletions
|
@ -171,4 +171,25 @@
|
|||
Messages.subscribe(HIFI_ADVANCED_MOVEMENT_DISABLER_CHANNEL);
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue