Collision detection of a 3D model with the terrain

Hi,

I have a scenario where a 3D model is loaded from a .glb file, and we make it fly in the world.

I want to show a “focus” state where a circle appears under the 3D model. You know, it is similar to how it looks in strategy games when you select a unit.

However, I want to know when the circle bumps into terrain or not to set the right heightReference and height. Otherwise, the circle sometimes renders under the ground.

Is there an easy way to detect circle’s intersection with any of the terrain tiles?

Hi @Mike_Dao ,
Thanks for your post and being a part of the Cesium community.

I am not sure how you are creating the circle. If for instance you are using an Entity, there are some settings available demonstrated in this sandcastle example Cesium Sandcastle to position the circle relative to the ellipsoid, terrain, tileset, etc.

Please let us know if the options demonstrated there fir your use case or if you have further questions.

Best,
Luke