Answer the question
In order to leave comments, you need to log in
How to set the movement of the character with swipes?
That is, the character is moving, and I let's swipe down, I ask him the other side of the movement as in screenshot number 2.
I wrote the code, but it doesn't work the way I need it, but I didn't find something on the Internet.
Answer the question
In order to leave comments, you need to log in
It's even very simple. Create a Vector3 swipeDirection variable. And when swiping, for example, to the left, you write swipeDirection = the vector along which the character will fly exactly to the left.
After that, this vector multiplied by the speed will be used in each frame. On the next swipe, this variable is simply overwritten. Nothing complicated
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question