Closed veyvin closed 7 years ago
@veyvin Are you raycasting to a specific point on the terrain? Is your position in world space? If so, use Transform.GetGeoPosition()
(extension method in VectorExtensions) as reference.
Something like this should work:
public static Vector2d GetGeoPosition(this Vector3 v, Vector2d refPoint, float scale = 1)
{
var pos = refPoint + (v / scale).ToVector2d();
return Conversions.MetersToLatLon(pos);
}
@david-rhodes 3Q
what I get is the tile's ID, but I want to get the lat/lon or Meter in terrain .