how to draw polygon on the terrain

polygon: {
                hierarchy: Cesium.Cartesian3.fromDegreesArray([...]),
                material: Cesium.Color.RED.withAlpha(0.5),
                classificationType: Cesium.ClassificationType.BOTH

the polygons I draw are beneath the the example code, it covers terrain but this time it cover tiles too. How can I draw a polygon between tiles and ground?

Does the drawing on terrain example not work for you? If not, can you provide a screenshot or a minimal code example on Sandcastle showing the issue?

If you don’t want the polygon to classify the tileset, you can also set the classificationType to ClassificationType.TERRAIN instead of BOTH (which is both terrain and 3D Tiles).