ignacioxd / ragin-mages

JavaScript MOBA game built with Phaser 3
https://raginmages.net
59 stars 21 forks source link

update joystick code #120

Closed geekingreen closed 6 years ago

geekingreen commented 6 years ago

I've been scouring for docs for how to use multi-touch input in Phaser 3 and the only thing I could find is here: https://phaser.io/phaser3/devlog/116 which says that they haven't implemented it yet. So I kinda hacked together a workaround which brings in some more issues but probably a little better experience. If you release the joystick it sometimes might stick in the direction you are currently going (tapping on it usually resolves this).

If anyone has figured out a way to capture more than one touch event I'm all ears :ear:

As I understand it if it were working properly with multi-touch, the dragging method would work since the second tap wouldn't steal the focus from the gamepad.