Cesium for Unity calculates the terrain profile

How to calculate terrain profiles in Cesium for Unity

We don’t have an easy out-of-the-box way to do this, but here’s some thoughts with the tools we have.

You could try using Physics.Raycast to raycast towards the center of the earth, getting an intersection point in Unity coordinates. Then, use CesiumGeoreference.TransformUnityPositionToEarthCenteredEarthFixed and EarthCenteredEarthFixedToLongitudeLatitudeHeight to convert the Unity coordinates. The resulting height value is not a height above mean sea level – it’s the height above the WGS84 ellipsoid. To get the height above mean sea level, you’d need to do something along the lines of what Kevin describes in this post:

I’ve fixed this issue, thank you very much