How to enable the model camera collision
This example shows how to enable camera collision for a splat model. When enabled, the camera can’t pass through the model when you zoom in too far. Instead, it collides with the model’s surface. The collision also keeps map navigation interactions, such as view rotation, centered on the model, resulting in smoother animations and more effective data visualization.
In the example, you can turn off/on the model collision by clicking the button.
Zoom in on the model to see how the camera collides with the view. Rotate the view to see how the rotation is centered on the model.
Enable camera collision
This feature is disabled by default. You can enable it by calling SplatModel’s setCameraCollision API method or by passing it as an option to the SplatModel constructor, as shown in this example.
Learn more
Check out the MapTiler GeoSplats SDK JS reference