I would like to get the green corridor following the terrain, but as you can see in the image above, it only touches the terrain at its highest point.
I currently use the following configuration:
It’s currently not possible yet. Corridors, polygons and rectangles with extruded height does not clamp to the terrain at the moment. It doesn’t look like there is a feature request for this in CesiumJS yet. Please feel free to open one! https://github.com/CesiumGS/cesium/issues/new/choose
I’m confused, what does HeightReference.RELATIVE_TO_GROUND do if not what Simon is asking? For example, if the heightReference is RELATIVE_TO_GROUND and the height is 100, each point of the corridor should sit 100m off the ground, right? That’s what it looks like in the Sandcastle example for HeightReference, though that uses Polygon instead of Corridor.
I´ve tried to adjust my code, but I cannot reproduce the behaviour of the sandcastle. Although I set the extrudedHeightReference to CLAMP_TO_GROUND the polygon seems to be drawn under the base layer of the globe.