问题
How to set Z-index of different shapes in Cesium? Refer Screen shot below:
I want the billboard icons inside the cylinder to be displayed over the cylinder.
Thanks in advance!
回答1:
It's not easy because your cylinders are actual 3D volumes, and your billboard is inside them. There's no CSS-style Z-indexing going on in the 3D rendering engine, just the depth buffer deciding on a per-pixel basis what's closest to the camera. The surface of the cylinder will always be closer than the center of the cylinder.
That said, can you move the billboards to the top of each cylinder, instead of the middle? If the billboards sit on top of the cylinders (with the billboard anchor point at the bottom-center), they should be outside of the cylinder and visible to the camera without a green surface in the way.
来源:https://stackoverflow.com/questions/38910276/cesium-how-to-set-z-index-of-different-shapes-in-cesium