I'm making a game where the player needs to swipe to move the character but there are only three positions: Left, center, right.
If the character is on the right and swipes, the character will go to the center, if its in the center and swipes to the left or right it will go to the desired direction and so on...
How do i achieve this?