How can I make my character move in the direction I swipe?

Hello guys.

I know I have been asking many questions for my first game. I managed to figure out the rest so here's the next question.
How can I make my character move in the direction I swipe? For example, I swipe towards the left, he moves towards the left and so on. All the directions are up, down, right, left. But NOT diagonal.

Thanks again to all of you who are helping me,

alex

Comments

Sign In or Register to comment.