Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pointer.movementX behaviour has changed between 3.17 and 3.18 #4611

Closed
davidmball opened this issue Jun 22, 2019 · 4 comments
Closed

pointer.movementX behaviour has changed between 3.17 and 3.18 #4611

davidmball opened this issue Jun 22, 2019 · 4 comments

Comments

@davidmball
Copy link

Version

  • Phaser Version: 3.18.0 / 3.18.1
  • Operating system: Ubuntu 19.04
  • Browser: Chrome

The behaviour of pointer.movementX (in a on 'pointermove') seems to have changed between 3.17 and 3.18. In 3.18 it seems to be a position rather than the delta movement between frames.

This can be seen changing in the Phaser example
https://labs.phaser.io/view.html?src=src\games\topdownShooter\topdown_combatMechanics.js&v=3.18.0
https://labs.phaser.io/view.html?src=src\games\topdownShooter\topdown_combatMechanics.js&v=3.17.0
where the reticle doesn't work well in 3.18 or 3.18.1.

Additionally I get the following error on the console for 3.18.1

phaser.min.js:1 Uncaught TypeError: Cannot read property 'push' of undefined
    at HTMLDocument.s.pointerLock.pointerLockChange (phaser.min.js:1)
@ol-web
Copy link

ol-web commented Jun 27, 2019

can confirm. changing pointer behavior was easy but the error with pointer lock is annoying even though it doesn't affect anything.

@davidmball
Copy link
Author

Note that this seems to have broken the callback for the pointerlock. Ie this example doesn't detect loss of pointer lock anymore.
https://labs.phaser.io/view.html?src=src\input\mouse\pointer%20lock.js
Specifically neither of these work.

  this.input.on('pointerlockchange', function (event) {

  });
  this.input.on('POINTER_LOCK_CHANGE_EVENT', function (event) {

  }, 0, this);

photonstorm added a commit that referenced this issue Jul 8, 2019
…ror about being unable to push to the Input Manager events queue. #4611
@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

@davidmball
Copy link
Author

Can confirm that the issue with the mouse movement is fixed. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants