Closest Entity

Blitz3D Forums/Blitz3D Programming/Closest Entity

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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