Closest Entity

Blitz3D Forums/Blitz3D Programming/Closest Entity

Eric(Posted 2005) [#1]
I have been searching for a piece of code, that determined to closet Entity.

I have let's say 20 Enemies and 50 targets. It is very slow to cycle through all of them to determine which is target is closest to each enemy. Does any one have something in their arsenal of code snipets that would help?

Regards,
Eric


Ross C(Posted 2005) [#2]
It's not really slow to do an entitydistance quick. Their lightning quick. :o)


IPete2(Posted 2005) [#3]
Eric,

If you use types then cycling is very very fast. As Ross suggests use entitydistance.

IPete2.