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

Virtual gamepad keys get stuck #2

Open
parasyte opened this issue Aug 16, 2013 · 0 comments
Open

Virtual gamepad keys get stuck #2

parasyte opened this issue Aug 16, 2013 · 0 comments

Comments

@parasyte
Copy link
Member

When I press "up" on the virtual dpad, then slide my finger toward the top of the screen, the "up" button gets stuck in an "always on" state. The only way to release it is by reloading the game.

Discovered the reason for this just tonight; The virtual gamepad listens for pointer events on only a small part of the viewport. The initial touchstart/PointerDown event will be fired when my finger first touches the button. Then as I slide my finger, a series of touchmove/PointerMove events will fire. Eventually, my finger will leave the rectangle that the virtual gamepad is registered to. The following events will not be dispatched to the virtual gamepad, because they are outside of the listening rect.

And if the touchend/PointerUp event is fired while outside of that rect, this missed event means the virtual gamepad button will never be released!

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

1 participant