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

setPollAlways() does nothing. InputManager only updates on DOM event callback. #4405

Closed
Shucki opened this issue Feb 28, 2019 · 6 comments
Closed

Comments

@Shucki
Copy link

Shucki commented Feb 28, 2019

Version

  • Phaser Version: 3.16.2
  • Operating system: Windows 10
  • Browser: Browser independent

Description

Expectation:
http://labs.phaser.io/view.html?src=src/input\mouse\poll%20always.js
If I don't move my mouse and the sprite moves over my mouse the sprite gets red.

Bug: InputManager only updates on any DOM input event callbacks. Make setPollAlways work or a way to manually trigger an InputManager update on my tween/animation update callbacks.

Example Test Code

http://labs.phaser.io/view.html?src=src/input\mouse\poll%20always.js

Additional Information

Make setPollAlways work(so the theres a loop in the InputManager that is called on a regular gameloop update and not just on event update) or a way to manually trigger an InputManager update on my tween/animation update callbacks.

@simeon-smith
Copy link

A note on this. It appears that this broke after 3.15.1. If you go to http://labs.phaser.io/edit.html?src=src\input\mouse\poll%20always.js you'll notice that it's loading 3.15.1 and still works. But when you're on http://labs.phaser.io/view.html?src=src/input%5Cmouse%5Cpoll%20always.js its loading 3.16.2 and doesn't work.

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

@Petah
Copy link

Petah commented Apr 14, 2020

@photonstorm This isn't working for me in 3.22.0, it works in 3.15.0

@Petah
Copy link

Petah commented Apr 14, 2020

Actually, I take the back. Doing this.input.activePointer.updateWorldPoint(this.cameras.main); in the update method works as per #4658

@photonstorm
Copy link
Collaborator

This issue has been mentioned on Phaser. There might be relevant details there:

https://phaser.discourse.group/t/mouse-pointer-coordinates-dont-update/1805/4

@samme
Copy link
Contributor

samme commented Oct 11, 2022

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

No branches or pull requests

5 participants