Best way to get three/four/five closest positions from an array?
#1

Working on a system that involves getting the three or so closest object positions from quite a large array, in comparison to a specific player. Keep in mind they not only have to be closest, but fit within a general range in categorization.

So:
  • Last object/position set: somewhere around 8000 - 10000 meters from player.
  • Third object: somewhere around 6000 - 8000 meters from player.
  • Second object: somewhere around 4000 - 6000 meters from player.
  • First object: anything BELOW 4000.
Any ideas on the most efficient way to accomplish this? I've thought of a few ways to do this, but I'm sure they're not the best methods. Thoughts?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)