From fa90d823d5b403072c1ccd6271c8edef1b3123cf Mon Sep 17 00:00:00 2001 From: howard-stearns Date: Wed, 18 May 2016 11:49:12 -0700 Subject: [PATCH] Turn off hand-controller pointer when Interface doesn't have focus. --- scripts/system/controllers/handControllerPointer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/system/controllers/handControllerPointer.js b/scripts/system/controllers/handControllerPointer.js index 6e9fe17077..921c55b7b2 100644 --- a/scripts/system/controllers/handControllerPointer.js +++ b/scripts/system/controllers/handControllerPointer.js @@ -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)) {