BUG: select goes through the alpha in the polygon material and selects bottom polygon, not top.

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

The entity default LMB select selects the wrong entity if the polygon has alpha in it's material.

The bug is that if you have 2 or more polygons above each other with alpha in their material, the select function doesn't select the entity closer to the camera but goes THROUGH and selects the bottom polygon.

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

In this example I try click the top polygon (BLUE) but it selects the bottom polygon (RED). If you remove the alpha, it correctly select the top blue entity.

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

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


Thanks for reporting this. The fact that they’re translucent means they’re rendered differently, so there’s a different way to pick (see https://cesiumjs.org/Cesium/Build/Documentation/Scene.html#pickTranslucentDepth). However, it looks like that still doesn’t work with Scene.pick. So I think this is a bug or just a missing feature.

I opened a GitHub to track this: https://github.com/AnalyticalGraphicsInc/cesium/issues/7032

No Problem, yeah I tried tampering with the translucent depth boolean and that didn't work. So for now I've just made my own pick function to get around this. I drill pick then pick the entity with the highest height in the array.

Thanks again for reporting this! It’s just been fixed and should be working with the next release (1.50) or right now in the master branch.

Scene.pick should now work without having to set pickTranslucentDepth.