Get a height in a specific location of the Cesium 3D tile set

Hi, I’m trying to get a height in a specific location of the Cesium 3D tile set.
I made a geotiff file with QGIS and uploaded it to the cesium ion.
So we downloaded the terrain file from Cesium Ion.
And I called the layer.json file in Cesium Unity. But I want to get a height in a specific location of the Cesium 3D tile set. I already tried to raycast towards the Cesium 3D tile set. But I think that is slower than getting the height from the Cesium 3D tile set. Actually, I want to find a better way.

It would be appreciated if you could send me a reply on this matter.

Physics.Raycast is currently the only way to get heights from terrain or 3D Tiles in Cesium for Unity. It should be pretty fast, because it uses the raycasting acceleration data structures of the physics engine. The main downside is that the necessary terrain must be loaded first, and there’s nothing automatic to help make this happen. We’re working on some improvements to make this easier, but can’t commit to a date for it at this time.

Thank you for your quick response!

Just to give an update, as of Cesium for Unity v1.13.0, you can now use the asynchronous SampleHeightMostDetailed function to query the height on a tileset, at a given longitude / latitude position. Remember that this height is returned in meters above the WGS84 ellipsoid!

You can find a quick example in the comment on this PR: Height query API for Unity by kring · Pull Request #507 · CesiumGS/cesium-unity · GitHub