Three points, which one is closest?
#1

Hi guys.

I'm wondering how I would go about having 3 points, and asking which one is the closest from where the player is. So just for an example,

Point 1: 1.00X, 2.00Y, 2.05Z
Point 2: 222.00X, 32.111Y, 333.33Z
Point 3: 1223.00X, 123.11Y, 321.11111Z

How would I ask which one the player is closest too?
Reply
#2

Loop through them all with the function GetPlayerDistanceFromPoint and then just looks which one's the closest. Really simple, if you ask me.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Loop through them all with the function GetPlayerDistanceFromPoint and then just looks which one's the closest. Really simple, if you ask me.
Okay thanks, I just didn't really know which method of doing it would be best.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)