mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 13:11:43 +02:00
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:
commit
e431fd3d65
1 changed files with 3 additions and 0 deletions
|
@ -405,6 +405,9 @@ function update() {
|
||||||
if (!Menu.isOptionChecked("First Person")) {
|
if (!Menu.isOptionChecked("First Person")) {
|
||||||
return turnOffVisualization();
|
return turnOffVisualization();
|
||||||
} // What to do? menus can be behind hand!
|
} // What to do? menus can be behind hand!
|
||||||
|
if (!Window.hasFocus()) { // Don't mess with other apps
|
||||||
|
return turnOffVisualization();
|
||||||
|
}
|
||||||
var controllerPose = Controller.getPoseValue(activeHand);
|
var controllerPose = Controller.getPoseValue(activeHand);
|
||||||
// Vive is effectively invalid when not in HMD
|
// Vive is effectively invalid when not in HMD
|
||||||
if (!controllerPose.valid || ((hardware === 'Vive') && !HMD.active)) {
|
if (!controllerPose.valid || ((hardware === 'Vive') && !HMD.active)) {
|
||||||
|
|
Loading…
Reference in a new issue