Ellipse not showing correctly

ellipse:{

      semiMinorAxis: 5.0,

      semiMajorAxis: 5.0,

      height: 0,

      material: Color.RED,

      heightReference: HeightReference.CLAMP_TO_GROUND,

    }

That’s interesting. I thought there might have been an issue with the heightReference and height specifications causing the terrain to cover parts of the object… but I can’t replicate the issue.

Here’s a Sandcastle example.

There are several reasons this could happen. The most common reason is that you have viewer.scene.globe.depthTestAgainstTerrain set to true but are not using terrain.

Do you have a terrain provider enabled?

If you have terrain enabled, then the problem is that you are explicitly settings height to 0 which tells Cesium to place the ellipse on the ellipsoid, even that would be below the terrain height (or partially below). height is in reference to the ellipsoid, not whatever the ground height is.

So my two recommendations would be:

  1. Don’t have viewer.scene.globe.depthTestAgainstTerrain set to true unless you are using terrain.
  2. Don’t set height of geometry to 0 explicitly unless you really want to ignore terrain and put it on the ellipsoid.
2 Likes

Thank you :slight_smile:

1 Like