Merge pull request #7921 from howard-stearns/turn-off-hand-controller-pointer-when-no-focus

turn off hand-controller pointer when Interface doesn't have focus
This commit is contained in:
Brad Davis 2016-05-18 14:45:35 -07:00
commit e431fd3d65

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)) {