Ground primitives always laid over 3D tiles


I'm having problem with picking objects in 3D tiles which overlap some ground primitive.

In older cesium version (not sure about version since I built it from source, I think it was around 1.35) the ground primitive was displayed under 3D tiles and clicking object worked properly. I've recently updated cesium (commit '2b6afbfab26396371a557c1711ab00478399d6fd') and now it shows ground primitive strapped over 3D tiles and clicking parts covered with ground primitive returns the ground primitive (or undefined if enablePickFeatures is set to false) -

I've tried adding the ground primitive to the PrimitiveCollection before or after adding 3D tileset (also lowerToBottom) but the result is always the same.

You can see it here -

The red circle covers buildings and clicking it returns the ground primitive first.

Is there a way to display ground primitve below 3D tileset so that it doesn't change color of covered objects from 3D tiles? I could't find anything in changelogs and it kinda broke my app since clicking on 3d tiles covered in ground primitve returns wrong object.

This was just fixed in When creating a GroundPrimitive set its classification type to TERRAIN.

var rectanglePrimitive = viewer.scene.primitives.add(new Cesium.GroundPrimitive({

geometryInstances : new Cesium.GeometryInstance({

geometry : new Cesium.RectangleGeometry({

rectangle : rectangle


attributes: {

color: Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 0.0, 0.0, 0.5))



classificationType : Cesium.ClassificationType.TERRAIN