deathkiller / jazz2

🎮 · Jazz² Resurrection: Open-source reimplementation of Jazz Jackrabbit 2
https://deat.tk/jazz2/
GNU General Public License v3.0
492 stars 18 forks source link

Can't move between virtual dpad buttons on Android #58

Closed trigonated closed 2 years ago

trigonated commented 2 years ago

Moving the finger between the left and right virtual dpad buttons doesn't change the character's direction, needing instead to lift the finger up between presses.

The issue seems to be related to a missing translation of pointer coordinates into viewport coordinates, causing "IsOnButton" checks to always fail on pointer move events.

I love this game and I would love to help out with this project, so I've actually not only already made a fix for this, but after testing I made an improvement to only accept moving the finger between buttons on the left and right buttons, avoiding accidental crouches while changing direction and making the game much easier to play on touchscreens. Are you guys open to pull-requests?

deathkiller commented 2 years ago

Thank you! Pull request would be awesome,

trigonated commented 2 years ago

To keep the commit history clean, I've decided to separate the fix and the improvement into two different issues (and pull-requests). Will create the issue related to the improvement very soon.

deathkiller commented 2 years ago

Merged. Thanks.