Hello, I have been trying to put mobile controls on my game, but there’s an issue that I can’t seem to figure out.
Down below you can see a screenshot of my game, it’s a top-down wave defence game, I wanna make it so you can move using the joystick on the bottom left, and if you press anywhere else in the screen you can shoot.
My issue is that when I try to move and shoot at the same time, the game starts fighting over where the cursor should be, and the gun angle gets messed up.
Now I already know about the “deactivate moving mouse cursor with touches” action, which does fix the issue, but then I can no longer angle the gun where I touch. I use the action angle object towards cursorX(),cusorY(), and I tried other actions but I never got it to work.
If anyone knows a solution, I would really appreciate the help.
De/activate moving the mouse with touches
You find that action put it to event with condition with for example at beginning of scene
And set it to NO
And you enjoy
Sorry only now i did read other half of your post
So basically what you need is learn to use touch IDs you will figure out from this topic
And then you need to simply check if any touch which start is made on some button (so basically you invert condition)
And since it was not THAT is your event for setting angle of gun to your touch
I should try to recreate you system to give you a good solution, I don’t work on mobile to much, but my last game use mobile controls and i can move two joystick at same time.