Hey! I’m making a 2-player mobile game in GDevelop and I’m stuck with the touch controls. Both players work fine separately, but I can’t control both of them at the same time with two fingers. The controls work by swiping left/right on each player’s controller to move them. Right now I’m using “CursorX()” to get the touch position. I’ve attached a screenshot of my events. What’s the best way to make both players respond to separate swipes at the same time? Thanks!
You could use the multi-touch functions.
https://wiki.gdevelop.io/gdevelop5/all-features/mouse-touch/
While you can detect when more than 1 object is being touched, the normal cursor functions can only return 1 position.
this might be a me problem but i already tried it and it didn’t work
Can you post a screenshot of what you tried?
There’s an example at the bottom of the link I posted earlier.
I haven’t used the multi-touch much. This example uses an object named Player with an object variable named TouchID. The first event group adds the touch ID as long as the object is touched and the 2nd group moves the object.



