MarcoFazioRandom / Virtual-Joystick-Godot

A simple virtual joystick for touchscreens, for both 2D and 3D games, with useful options.
MIT License
731 stars 80 forks source link

HTML Mobile Support for Multi-Touch and Visibility #85

Open avivajpeyi opened 1 day ago

avivajpeyi commented 1 day ago

Thanks for this awesome virtual joystick plugin.

I’m working on a project that uses the joystick in HTML builds (for mobile devices / PCs) and would appreciate any advice on two points:

  1. Multi-touch on HTML builds: Do you have any recommendations or tips to enable multi-touch support so the joystick works seamlessly on mobile browsers?
  2. Visibility on non-mobile HTML: Is there a way to set Visibility Mode <- TouchScreen only so that the joystick is hidden when running on non-mobile HTML environments?

Any guidance on this would be really helpful. Thanks again for your work!

MarcoFazioRandom commented 1 day ago

Hello! For the multi-touch issue, have you tried the solution explained in the documentation faq->multitouch-issue? For the visibility, can you explain better what is your goal? When "touchscreen only" is enabled, the script check if the device has a touchscreen, if not the joystick is hidden.

avivajpeyi commented 1 day ago

Hey @MarcoFazioRandom , thanks for your reply!

1. Multi-touch: For multitouch -- yes, following your FAQ i had set

"Emulate Touch from Mouse" : ON
"Emulate Mouse from Touch" : OFF
Screenshot 2024-11-05 at 11 07 27 AM

Sorry -- i think my issue was not clear.

2. touchscreen only

I have it enabled to touchscreen only, but it is till rendering the joystick on web_macos/editor?

Screenshot 2024-11-05 at 11 12 57 AM Screenshot 2024-11-05 at 11 16 10 AM