Closed keithrdavis closed 1 year ago
Hello, as stated in the README, you should have this configuration:
"emulate touch from mouse" ON "emulate mouse from touch" OFF
because only the inputs from the touch support multitouch.
I did go over the README setting suggestions; however, if I use those settings, my buttons don't work i.e. my main menu has buttons and they won't function without having "emulate mouse from touch" ON.
I understand, but the problem is that in Godot if you use the mouse you can't use multitouch, it has nothing to do with this my script, and I can't do anything about it.
I don't know why your buttons don't work with that options ON, that seems the problem that needs to be fixed.
I won't close this issue right now because someone else could run in the same problem in the future, please when you fix it comment here or link to the solution you found.
I fixed it. I was using TextureButton for my mobile play buttons. Changing them to TouchScreenButton fixed the issue.
The joystick is working with "Use Input Actions".
Emulate touch from mouse is disabled. Emulate mouse from touch is enabled for menu and player action buttons e.g. the attack button.
I have a TextureButton with the following code:
When using just keyboard input without the Joystick and TextureButton, I can move and attack simultaneously. When using the Joystick/TextureButton on a mobile device to move and attack, I can only do one or the other. Sometimes if I press & hold the TextureButton first to attack and then touch/move the joystick I can do both (Doing movement with joystick first then pressing attack does not work). I wonder if this is because of the button and the need for mouse emulation so the button works when touched.
Any ideas? Thanks in advance!