Update vive controller display to not hide on equip

This commit is contained in:
Ryan Huffman 2016-10-25 08:27:20 -07:00 committed by Chris Collins
parent 9846614468
commit 4a28ca670a

View file

@ -16,6 +16,8 @@
Script.include("controllerDisplay.js"); Script.include("controllerDisplay.js");
Script.include("viveControllerConfiguration.js"); Script.include("viveControllerConfiguration.js");
var HIDE_CONTROLLERS_ON_EQUIP = false;
// //
// Management of controller display // Management of controller display
// //
@ -116,12 +118,14 @@ ControllerDisplayManager = function() {
} }
} }
} else if (channel === 'Hifi-Object-Manipulation') { } else if (channel === 'Hifi-Object-Manipulation') {
data = JSON.parse(message); if (HIDE_CONTROLLERS_ON_EQUIP) {
visible = data.action !== 'equip'; data = JSON.parse(message);
if (data.joint === "LeftHand") { visible = data.action !== 'equip';
self.setLeftVisible(visible); if (data.joint === "LeftHand") {
} else if (data.joint === "RightHand") { self.setLeftVisible(visible);
self.setRightVisible(visible); } else if (data.joint === "RightHand") {
self.setRightVisible(visible);
}
} }
} }
} }