How do I make entities not 'pickable' or how do I ignore translucent entities so I can pick entities inside?

1. A concise explanation of the problem you’re experiencing.

I’ve got a translucent polygon that defines a “space”. There are other entities that might be inside and overlap the space. I’d like to be able to pick the objects that are inside the translucent polygon, but all I can ever pick is the translucent polygon.

How can I can pick the entity that is inside the polygon and ignore the polygon entity.

I found this question over two years ago… https://groups.google.com/d/msg/cesium-dev/0XA8qWPQfRE/jcyq-2aFBwAJ Is there any update? Is there an alternative?

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var orangePolygon = viewer.entities.add({

name : ‘Orange polygon with per-position heights and outline’,

polygon : {

hierarchy : Cesium.Cartesian3.fromDegreesArrayHeights([-108.0, 25.0, 100000,

-100.0, 25.0, 100000,

-100.0, 30.0, 100000,

-108.0, 30.0, 300000]),

extrudedHeight: 0,

perPositionHeight : true,

material : Cesium.Color.ORANGE.withAlpha(0.1),

outline : true,

outlineColor : Cesium.Color.BLACK

}

});

var bluePoint = viewer.entities.add({

name: ‘Point #1’,

position : Cesium.Cartesian3.fromDegrees(-105.0, 28.0, 50000),

point : {

pixelSize : 10,

color : Cesium.Color.BLUE

}

});

viewer.zoomTo(viewer.entities);

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

Explained above. The translucent container identifies a boundary for which actions can be performed on the entities within. I need to be able to select the entities so that the user the user can then apply an action upon the entity.

4. The Cesium version you’re using, your operating system and browser.

cesium >1.58.1

**Chrome **Version 75.0.3770.142

I think your best bet right now is to essentially implement this logic in your app. Use scene.drillPick to select all the entities, and then you can mark the “space” one with a custom flag, that you can then ignore when you iterate over the list of entities returned.

Let me know if that works.