Intersection with 3D Tileset

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

So I’ve seen that you can use. globe.pick() to test if a ray intersects with the terrain. I’m wondering if there’s any way to do the same thing with a 3D tiles model.

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

I’m trying to test visibility similar to this example: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases&gist=822f432f2955dc9d57dee6d42f3632a6.

But instead of terrain blocking the view, I want to see if my model is blocking the view.

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

Cesium 1.35 on Chrome on Windows 10.

Hi,

Yes, you are able to pick individual 3D tiles features, see this example for feature picking: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=3D%20Tiles%20Feature%20Picking.html&label=Showcases

Thanks,

Gabby

I’m probably missing something obvious but how would one test whether a ray intersected a tiles model using scene.pick()? It seems like you can only test whether a model intersects a Cartesian2. If I’m trying to test visibility, my thought was I’d create a ray from my camera’s position to that point and test whether that ray intersects the model. Is there another way to do this? Thanks.

Scene.pick will cast a ray from the camera to that Cartesian2 position on the screen and check intersections with that ray. I’m not aware of an equivalent that you can do that with a Cartesian3 position. Unfortunately with Globe.pick it will only check intersections with the globe surface itself.