Ground Detection in Cesium for Omniverse

Hello everybody, hope you’re having a good day! :slightly_smiling_face:

I’m working in scene with most basic Omniverse+Cesium setup (the one you can get by following cesium’s guides on “Cesium for Omniverse - Getting Started”), and I have two things I couldn’t quite figure out by myself:

In all cases below, by “ground” I mean Cesium_World_Terrain (CesiumTilesetPrim)

1. Perpendicular raycast from prim to the ground
I’m looking for a way to cast a perpendicular raycast from a prim into the ground (for the sake of discussion, let’s say that prim is georeferenced, i.e. has Cesium Globe Anchor), and find the point at which the raycast hits the ground - what interests me the most is this point’s lat, lon, and height, but especially height.

2. Mouse to ground raycast
The other thing I want is a way to get lat, lon and height of a point on the ground I click on in my viewport. I imagine in this case it would be a raycast shot from the camera into the ground.

Any help in any of these two matters would be greatly appreciated!

Hi @maxiping20

#154 might be a potentially relevant issue. We’re about to evaluate omni.kit.raycast.query for RTX-based raycasting, and if that doesn’t work we may fall back to CPU based raycasting.