Mobile Virtual Controller Problem


I created a simple virtual controller for my 2D Platformer Game, I have a Jump, Up, Left and Right button. The functions works well but when I hold the button for a seconds (example I hold/clicked/touched) the Right button my character move to the right but when I release my finger my character still moving right…

Any solution for this problem?

Thank you…

Hi, I think you need to check if the touch is still being held for each arrow, try adding this condition:

It happens because Touch is like a mouse cursor, and the position will stay in the same position even after you let go of finger.


Hi can you check my conditions if I did right your solution?

It’s close, try making only “The cursor/touch is on VirtualController____” sub events of “Touch or Left mouse buton is down”. Then try to test it!

I tried that but still not working, when I added Touch or Left mouse button is down, my actions won’t work now

Maybe that’s beacause it’s like you are pressing the right button a lot of time?

Yeah, that’s what my problem is, if I pressed or clicked the button for a long time and release my finger my character still moving to the right where it should be stopped.

I’ve never used this kind of command before. I may suggest to add an event for “stopping” the player when the touch is released, but maybe there is a better way

I fixed it now, it just happened on pc/laptop view then I tried to play it on my mobile phone and everything works fine.

1 Like