Topic: Get coordinates from Vector2

Hi,

I'm casting a ray from an object and then I'm trying to get the coordinates from the hit point. I'm transforming the hit point from global to local space (using the map gameobject transform) to get its relative position and then I use this position on OnlineMaps.control.GetCoords() to get the coordinates, but it always returns me lng = 0 and lat = 0. When I'm using the Input.mousePosition it works fine, but I can't use that because I'm developing a VR Application, so I have to use raycast.

Does anybody know why is this happening?

Re: Get coordinates from Vector2

Hello.

GetCoords expects screen position, not world or local position.
To convert the world position to coordinates use OnlineMapsTileSetControl.GetCoordsByWorldPosition.
http://infinity-code.com/doxygen/online … 0ad55b7506

Kind Regards,
Infinity Code Team.

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