as functions

This commit is contained in:
James B. Pollack 2016-08-17 16:24:59 -07:00
parent 514d6ec139
commit fdfcc235b6

View file

@ -18,12 +18,9 @@ function registerMappings() {
mappingName = 'Hifi-AdvancedMovement-Dev-' + Math.random();
advancedMapping = Controller.newMapping(mappingName);
var VIVE = Controller.Hardware.Vive;
var LSY = Controller.getValue(VIVE.LSY);
var LSX = Controller.getValue(VIVE.LSX);
var RSY = Controller.getValue(VIVE.RSY);
advancedMapping.from(VIVE.LY).when(LSY).invert().to(Controller.Standard.LY);
advancedMapping.from(VIVE.LX).when(LSX).to(Controller.Standard.LX);
advancedMapping.from(VIVE.RY).when(RSY).invert().to(Controller.Standard.RY);
advancedMapping.from(VIVE.LY).when(Controller.getValue(VIVE.LSY)).invert().to(Controller.Standard.LY);
advancedMapping.from(VIVE.LX).when(Controller.getValue(VIVE.LSX)).to(Controller.Standard.LX);
advancedMapping.from(VIVE.RY).when(Controller.getValue(VIVE.RSY)).invert().to(Controller.Standard.RY);
}
function removeTranslationFromLeftStick() {