Topic: Best way to get distance between two sets of coordinates?

the title says it all, whats the easiest way to get the distance between two sets of coordinates?

Re: Best way to get distance between two sets of coordinates?

Hello.

OnlineMapsUtils.DistanceBetweenPoints
http://infinity-code.com/doxygen/online … bc84a165f2

Kind Regards,
Infinity Code Team.

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

Re: Best way to get distance between two sets of coordinates?

Hello,

I am using that method to get the distance but it's returning a vector2, is that normal? How can I get it as one number?

Re: Best way to get distance between two sets of coordinates?

Hello.

Yes, it is normal.
In some cases useful to have distance by latitude or longitude.
Use «Vector2.magnitude» to get the total distance.
https://docs.unity3d.com/ScriptReferenc … itude.html

Kind Regards,
Infinity Code Team.

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