Only update movement when mouse is locked

This commit is contained in:
Wouter Commandeur 2014-05-17 12:01:40 +02:00
parent e041eea968
commit ce34da80c6

View file

@ -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;