Touch problem on touch screen device

Hi Guys,

I am new to G Develop and got stuck on touch functionality on touch screen devices.
The problem is when I touch the movement button the player keeps on moving unless i press some other button.
I want it to move until I keep the button pressed and after releasing the button it should stop.
Note : I have used trigger once but after that it completely stopped moving.
So please help.

Hi!
When you touch the screen, it’s like moving the cursor where the finger is, so the cursor remains on the button until you touch somewhere else.
Try to add a condition “Left mouse button is pressed”.

I have never tested it on a mobile device, but there is also the action “De/activate moving the mouse cursor with touches”

As said you need mouse button pressed first at least is what I do.

1 Like

I had the same problem! Be sure to add this line:

Fixed it for me!

3 Likes

Thank you very much its working now.
but could anyone help me regarding multi touch, now i am facing issues regarding multi touch.

Great.
There’s an official example for multitouch.

Hi,
Could you please let me know what are you referring to as I am unable to find the multitouch example.
I am looking at : GDevelop 5 [GDevelop wiki]
thanks in advance.

try here

but I still don’t understand well it is quite simple. I think you have to register all touches and then procress them?? :thinking:

I have the same problems too which i piggybacked on a different forum. The player (platformer) no longer runs and jumps non stop but now I am unable to touch and drag in game objects on my mobile android. Its now a basic Super Mario platform jumping game without the addition of touch and dragging objects. By “Deactivating moving the mouse cursor with touches”, the game becomes a basic mario platform game. By activating it (i might be getting it mixed up) I can drag in game objects and also allow my player to run left, right and jump, but the player does it non stop. I cant seem to have the best of both world where my game can be a super mario platform game all the while allowing me to touch and move other game objects around as platforms.