mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 22:52:14 +00:00
Only update movement when mouse is locked
This commit is contained in:
parent
e041eea968
commit
ce34da80c6
1 changed files with 1 additions and 1 deletions
|
@ -385,7 +385,7 @@ Phaser.Pointer.prototype = {
|
|||
this.screenX = event.screenX;
|
||||
this.screenY = event.screenY;
|
||||
|
||||
if (this.isMouse && !fromClick) {
|
||||
if (this.isMouse && this.game.input.mouse.locked && !fromClick) {
|
||||
this.rawMovementX = event.movementX || event.mozMovementX || event.webkitMovementX || 0;
|
||||
this.rawMovementY = event.movementY || event.mozMovementY || event.webkitMovementY || 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue