Created: January10, 2024 Updated: January10, 2024
To get a real world coordinates of any position on the terrain we need to use this function:
DVector3 GISTerrainLoaderGeoConversion.UnityWorldSpaceToRealWorldCoordinates(Vector3 position, GISTerrainContainer container, bool GetElevation = false ,RealWorldElevation elevationMode = RealWorldElevation.Altitude);
Position = Position if a gameobject in unity world space.
Container = Reference to the Terrain Container .
GetElevation = Enable to return Coordinates + Elevation value in [m].
ElevationMode = Elevation compared with (Elevation, Height, Altitude).
Set Real World Position means that we introduce a real world coordinate to get Unity World Space Position, to do this we need to use this function:
Vector3 GISTerrainLoaderGeoConversion.RealWorldCoordinatesToUnityWorldSpace(GISTerrainContainer container, DVector2 RealWorldCoor, float RWElevationValue=0, SetElevationMode elevationMode = SetElevationMode.OnTheGround, float Scale = 1)
Container = Reference to the Terrain Container.
RealWorldCoor = Real World Coordinates.
RWElevationValue= Real World Elevation value [m]
ElevationMode = In which mode the real world elevation is refer to.
Scale = Elevation Scale by default = 1.