Topic: Problems with conversion accuracy

Hi, I'm having trouble converting from World Position to Unity to lat - lon position. I am using the function
posLatLon = OnlineMapsControlBase.instance.GetCoords(posxz);
where posxz is a Vector2 that tells me the position of the object in the xz plane.
The imprecision is in the order of a hundred meters.

I noticed that using this function the accuracy is very high instead.
Vector2 posCursor = OnlineMapsControlBase.instance.GetCoords();

I know about the "Get Position By World Coordinates" action but I don't have it.

Thanks,
Ilaria

Re: Problems with conversion accuracy

Hello.

GetCoords converts screen position to coordinates, and that won't work for your purpose.

You need to use OnlineMapsTileSetControl.GetCoordsByWorldPosition:
https://infinity-code.com/doxygen/onlin … 0ad55b7506

Kind Regards,
Infinity Code Team.

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