rexrainbow / phaser3-rex-notes

Notes of phaser3 engine
MIT License
1.21k stars 263 forks source link

Lock joystick on horizontal axis #375

Closed Sulorb closed 1 year ago

Sulorb commented 1 year ago

Hello,

After modifying the source code to prevent the function setVector() with a y axis different than 0 in vain, I'd like to ask how could i lock the joystick axis horizontally?

I am using the joystick parameter dir: 'left&right' But if the user can visually move the joystick up & down he may not understand why if he can only move the sprite left or right.

Thanks.

rexrainbow commented 1 year ago

Feature added, please test it on this demo, change dirMode to 'up&down', or 'left&right'. NPM package will be upgraded at end of this month.

Sulorb commented 1 year ago

This is awesome. Thank you so much, for this quick answer and for all your work that helps so many people. 🙏