1

Topic: Find closest gps location

Hi, first of all, thanks a lot for this asset, it's wonderfull and very easy to work with.

I have a small question, i have multiple gps locations set in my game, and i 'd like to find the closest from my player.
To be more precise, i have  5 or 6 enemies in different areas of the world, and i'd like to know which one is the closest to me, and return it.

Thanks in advance if you can help me.

Re: Find closest gps location

Hello.

Calculate the distance between your position and the position of each enemy using OnlineMapsUtils.DistanceBetweenPoints, and find the minimum value.
http://infinity-code.com/doxygen/online … dd617a6d18

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.