How to move entities that are under terrain to the top of it?

I'm drawing some entities with data that I get from a service.

However, the height values that I get always put the entities under the terrain. Is it possible to detect this and move them to the top of the terrain?

Thanks in advance.

Most entity types should have a heightReference property that’ll allow you to clamp it to the ground (see )

For example, when creating a point ( you can set the heightReference to Cesium.HeightReference.CLAMP_TO_GROUND and that’ll ensure it’s always above ground on the terrain. Here’s a Sandcastle example: