Turn off hand-controller pointer when Interface doesn't have focus.

This commit is contained in:
howard-stearns 2016-05-18 11:49:12 -07:00
parent 9a3b6bf081
commit fa90d823d5

View file

@ -405,6 +405,9 @@ function update() {
if (!Menu.isOptionChecked("First Person")) {
return turnOffVisualization();
} // What to do? menus can be behind hand!
if (!Window.hasFocus()) { // Don't mess with other apps
return turnOffVisualization();
}
var controllerPose = Controller.getPoseValue(activeHand);
// Vive is effectively invalid when not in HMD
if (!controllerPose.valid || ((hardware === 'Vive') && !HMD.active)) {