mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +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 updatePosition = false;
|
||||
|
||||
if (x < 0) {
|
||||
if (x <= 0) {
|
||||
newX = Window.innerWidth;
|
||||
updatePosition = true;
|
||||
} else if (x > Window.innerWidth) {
|
||||
} else if (x >= Window.innerWidth) {
|
||||
newX = 0;
|
||||
updatePosition = true;
|
||||
}
|
||||
|
||||
if (y < 0) {
|
||||
if (y <= 0) {
|
||||
newY = Window.innerHeight;
|
||||
updatePosition = true;
|
||||
} else if (y > Window.innerHeight) {
|
||||
} else if (y >= Window.innerHeight) {
|
||||
newY = 0;
|
||||
updatePosition = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue