Joystick for Movement and Shooting

I found WishForge’s Joystick control for moving and it works fine but it can’t do multitouch because when I try it on mobile, when I simultaneously controls the joystick, as well as using another finger to touch anywhere on the screen, the controls are getting wild.

Is there a way it can be a multi-touch so that I can replicate it and make a shooting behavior using another joystick like most other games with a joystick for movement and shooting.
If anyone of you have a template with two joysticks working will be helpful too!

If I remember correctly, there was an object that works as a mouse, right?
But I don’t see it in your game :thinking:
Maybe, you can make two of those, one for controlling joystick and another for buttons, and maybe do:
If TouchInOut = Yes and The cursor or touch is on Action Button
Make mouse2 object at the position MouseX"UI"); MouseY(“UI”) and
If mouse2 is in collision with ActionButton:
Do certain action.

1 Like

You’ll have to change it to use multi touch. At the moment you’re just using the mouse position, which is either mouse or single touch.

To make it multitouch will require keeping track of which touch id is on which joystick, and action accordingly. It’s bit more coding (obviously), but quite manageable

1 Like

Thanks for the tips! I’ll try experimenting on it!:smiling_face_with_three_hearts:

There is an example multitouch game in the engine. It’s just the bare basics for the system, but it will show you how to start using those event actions/conditions.