Hi all,
**is there a way for someone to check whether an enity (or a Cartesian3 position) is occluded by terrain? **
(Sorry of this is too obvious, a quick search on forum/ggogle didn’y produce something)
Thanks in advance
Hi all,
**is there a way for someone to check whether an enity (or a Cartesian3 position) is occluded by terrain? **
(Sorry of this is too obvious, a quick search on forum/ggogle didn’y produce something)
Thanks in advance
Hi Thanassis,
You should be able to use Globe.pick to find an intersection between any ray and the globe surface. Also Scene.pick if you want to return the selected entity, but the ray will always originate at the camera. See the picking demo for examples of these functions in use.
Thanks!
Gabby
Would this suggestion be any different now with these improvements? https://cesium.com/blog/2018/07/30/billboards-on-terrain-improvements/
I’m wondering if maybe there is a property on the entity that can be read now that it shows/hides completely.
I don’t think there is. This is the PR that added support for that improvement mentioned on the blog: https://github.com/CesiumGS/cesium/pull/6621
You’ll notice the actual computation of whether the billboard is occluded happens in the shader:
This makes it fast, but means you can’t retrieve this on the CPU side. Picking is probably still the way to go.