3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 06:55:39 +02:00

Merge pull request from wayne-chen/RC68

Adding fix for enabling saved front/back advanced controls. (RC68)
This commit is contained in:
John Conklin II 2018-05-25 10:58:59 -07:00 committed by GitHub
commit 5dadfde637
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,4 +171,24 @@
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