Clipping Map View when moving

I was following the setup of polygon clipping which worked great, thank you. Now, I’d like to move the 3D tiles during runtime to achieve an effect of someone swiping across the map, e.g. just like when swiping the map on google maps of your phone. However, if I move the Cesium 3D tileset the new position is not being updated and instead the clipped surface stays where it was applied at the start of the game.

Hi @xrdevrob,

Polygon clipping is designed for static (non-moving) purposes, so it may not be viable for your use case. But you will probably find more success if you use CesiumTileExcluder instead.

This Github issue contains instructions for how to set up a simple CesiumBoxExcluder with custom logic. For your own case, you can make this excluder move at runtime with user input. Let us know if you have any follow-up questions!

Thanks for the response. I followed this guide but it seems like since then the shader has changed and if I follow the guide I can’t get the clipping to work nor can I utilitze the current clipping that can be seen in the current shader.

Any idea? Does anyone have a working shader?

I am still looking for a working shader… Has anyone recently been able to clip the tileset with a working shader?

Hi @xrdevrob,

It would help to see screenshots of what you’ve tried so far. From there, people could give input about the shader setup and what may be missing. :smile: