[SOLVED] Swiping Controls not working

So Basically, I have a character that when you swipe left, or right it moves left/right. and when you swipe up it jumps.

There are a few issues,

  1. the speed of the swipe and the character don’t move at the same speed (character is faster than swipe)
  2. when i lift my finger (stop swiping), the character continues moving
  3. when the character reaches the border of the screen, it will not move even if you swipe.

Please help ! Thank you!

Hi everyone I’m still struggling with this :frowning: If anyone can suggest any pointers I’d really appreciate it

I think you’ve mixed up 2 actions :
Swipe is in progress : action should be “Enable swip detection: false”
Swipe has juste ended : action should be “Enable swap detection: true”

This way when the player has swiped, he’ll have to wait for the end of the swipe before he can swipe again.

I believe what’s happening with your current code is once you swiped, the swipe detection is disabled and nowhere else in your code is it enabled again.

EDIT : Ignore my post, I’m wrong

You were right, I changed it but it still doesn’t work ://

That’s not true, swipe detection should be enabled the whole time (unless you want to disable it, for example when game is paused or in the menu)

The swipe is simply detected as a start and end point… there is an action to draw the line using a shape painter if you want to see how it works.

Oh sorry I thought I was helping, my bad :frowning:

Hey no worries, I actually thought it worked that way when I first tried it!

Thanks for your input guys, but still it doesn’t work and it is fundemental for my game :sob:

Solved it in the end, thanks though!