- Home /
Closest object from player relative to swipe direction
Hello!
I have a problem trying to find out the closes points, relative to swipe direction.
If I have the player in the middle whom is surrounded by points, how do I detect after a swipe, which points angle, relative to the player, is then closest match and then store that information.
Do I need to go about to create an array and compare all the informaion or is there a better way? All the points are in constant movement and the order and number of them will always change.
I currently get the swipe angle stored as a vector2.normalized.
Thanks! :)
Your answer
Follow this Question
Related Questions
Finding the angle between 2 clicked points 2 Answers
Find out x at y 0 Answers
Maths: Given a point on a circle and a fixed length line. Find the next closest point on the circle. 2 Answers
Boat physics 2 Answers