0

I'm making an endless runner on Unity. There was a problem, how to make that when swiping up, the cube moved by 0.5 on the Z axis, and similarly, when swiping down, by -0.5 on the z axis.

P.S. that is, the cube has a position of 0, when swiping up, it moves to the coordinate 0.5, when swiping up again, it moves to the coordinate 1, etc.

I also attached a photo with my idea.

Cube

  • does this (https://stackoverflow.com/questions/41491765/detect-swipe-gesture-direction) answer your question? – Leoverload Dec 26 '20 at 11:45
  • 1
    Does this answer your question? [Detect swipe gesture direction](https://stackoverflow.com/questions/41491765/detect-swipe-gesture-direction) – Leoverload Dec 26 '20 at 11:45

0 Answers0