mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 20:07:47 +02:00
Prevent the cursor from being stuck on the most outer edges of the screen
This commit is contained in:
parent
a06c9eccca
commit
3779a4780e
1 changed files with 4 additions and 4 deletions
|
@ -316,18 +316,18 @@ CameraManager = function() {
|
||||||
var newY = y;
|
var newY = y;
|
||||||
var updatePosition = false;
|
var updatePosition = false;
|
||||||
|
|
||||||
if (x < 0) {
|
if (x <= 0) {
|
||||||
newX = Window.innerWidth;
|
newX = Window.innerWidth;
|
||||||
updatePosition = true;
|
updatePosition = true;
|
||||||
} else if (x > Window.innerWidth) {
|
} else if (x >= Window.innerWidth) {
|
||||||
newX = 0;
|
newX = 0;
|
||||||
updatePosition = true;
|
updatePosition = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (y < 0) {
|
if (y <= 0) {
|
||||||
newY = Window.innerHeight;
|
newY = Window.innerHeight;
|
||||||
updatePosition = true;
|
updatePosition = true;
|
||||||
} else if (y > Window.innerHeight) {
|
} else if (y >= Window.innerHeight) {
|
||||||
newY = 0;
|
newY = 0;
|
||||||
updatePosition = true;
|
updatePosition = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue