Find altitude of 3d tileset at coordinates

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

I have a Cesium3DTileset and some coordinates (without altitudes) that I want to place markers at, resting on the surface of the tileset. I’ve managed to do it by loading the tileset, moving the camera to the coordinates looking straight down, and using Scene.pickPosition. I’m wondering if there’s a better way to do this; specifically one that doesn’t involve moving the camera.

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

it’s not a bug, i’m looking for alternative suggestions

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

I want to place a bunch of markers on the surface of my tilesets at various (lat,lng) positions, but i don’t have altitude data. the tilesets are above the surface of the ellipsoid, and i don’t want the camera to move while doing this operation. if i use Scene.pickPosition without a nadir camera position the result is off because the pick ray isn’t piercing the tileset at the coordinates i want the altitude of.

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

whichever version there’s a solution in, I can switch to.

Hi Conner,

Using picking is your best bet for now, as we don’t currently have support for clamping to a tileset (though it is planned! See #6080).

However, I think you should be able to create a new Camera, position and orient it, and use that camera’s pick function so you don’t have to move your main camera.



Can you show an example of the new functionality (#6080) how you can obtain the altitude of 3d tileset at coordinate?


We’ve been working on this feature, and have pull request open with the functionality, #6934. Here’s a Sandcastle example of its use. Additionally, you can also checkout that branch in github if you want to try it yourself.