Intersection of a ray and rendered terrain (not ellipsoid)

Firstly thank you for making Cesium available!

I'm working on an application which uses Cesium as a real time display for an open source UAV ground station. I'm attempting to find the intersection of a ray from a point in space to the terrain rendered in the scene. The end goal is to obtain these points to create the bounding box for a sensor footprint in uneven terrain.

I have done a search of this board and could not find any real hints other than perhaps using IntersectionTests.rayTriangle to test for intersections with QuantizedMeshTerrainData as per this question:!searchin/cesium-dev/terrain$20intersection/cesium-dev/cr1tDCxPTvY/5n_GxgNcBQAJ

Would this still be the best method for achieving what I describe? Any further hints or guidance on the matter would be greatly appreciated!


Hello Sam,

If you have a ray, you can use viewer.scene.globe.pick(ray, viewer.scene); to get the position what it intersects with the terrain. Here is the documentation: