Hey everyone,
I have a touch game where I am registering a swipe. I grab the world location vector when you press, and grab the world location vector where you release. I am able to calculate the distance, and if it is over a set length, it will register as a swipe.
Now, I am not a programmer, so I am not sure how to get the angle of the two vectors, as it will rotate the character in the direction of the swipe. I found a few different solutions online, but none of them have worked. I’m sure there is some programming 101 thing you need to do before hand.
This is most likely a stupid, easy solution, can anyone help me out?