mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 17:23:29 +02:00
fix paused interactions with mouse
This commit is contained in:
parent
b7d1659852
commit
74c5ddd49f
2 changed files with 7 additions and 5 deletions
|
@ -176,9 +176,11 @@ function goAway() {
|
||||||
|
|
||||||
// tell the Reticle, we want to stop capturing the mouse until we come back
|
// tell the Reticle, we want to stop capturing the mouse until we come back
|
||||||
Reticle.allowMouseCapture = false;
|
Reticle.allowMouseCapture = false;
|
||||||
if (HMD.active) {
|
// Allow users to find their way to other applications, our menus, etc.
|
||||||
Reticle.visible = false;
|
// For desktop, that means we want the reticle visible.
|
||||||
}
|
// For HMD, the hmd preview will show the system mouse because of allowMouseCapture,
|
||||||
|
// but we want to turn off our Reticle so that we don't get two in preview and a stuck one in headset.
|
||||||
|
Reticle.visible = !HMD.active;
|
||||||
wasHmdMounted = safeGetHMDMounted(); // always remember the correct state
|
wasHmdMounted = safeGetHMDMounted(); // always remember the correct state
|
||||||
|
|
||||||
avatarPosition = MyAvatar.position;
|
avatarPosition = MyAvatar.position;
|
||||||
|
|
|
@ -410,8 +410,8 @@ function update() {
|
||||||
if (!Menu.isOptionChecked("First Person")) {
|
if (!Menu.isOptionChecked("First Person")) {
|
||||||
return turnOffVisualization(); // What to do? menus can be behind hand!
|
return turnOffVisualization(); // What to do? menus can be behind hand!
|
||||||
}
|
}
|
||||||
if (!Window.hasFocus()) {
|
if (!Window.hasFocus() || !Reticle.allowMouseCapture) {
|
||||||
return turnOffVisualization(); // Don't mess with other apps
|
return turnOffVisualization(); // Don't mess with other apps or paused mouse activity
|
||||||
}
|
}
|
||||||
leftTrigger.update();
|
leftTrigger.update();
|
||||||
rightTrigger.update();
|
rightTrigger.update();
|
||||||
|
|
Loading…
Reference in a new issue