Clamping Walls to terrain

Hi there,

I've tried a few ways to clamp walls to terrain but I couldn't yet find a working example (for features, billboards, etc., i've found a few).

The idea is to have the bottom of a wall to follow the terrain profile (the wall has its own height and will follow along the terrain).

heightReference : Cesium.HeightReference.CLAMP_TO_GROUND,


clampToGround : true

don't seem to do the trick.

And if I add my wall as :

wall : {
            positions : Cesium.Cartesian3.fromDegreesArrayHeights(profile.points),
            material : profile.material,

It will simply appear floating if my terrain altitude is negative.

It looks like the WallGraphics doesn’t support either of those options:

Your best bet might be to get the terrain/3D Tiles height at each position, and then create the wall geometry using those positions, something like what this code example does: