Prevent camera from passing through GLB object

Hello,
I want to prevent the camera from passing from glb objects when using zoom and rotation.
I tested with:
camera.useFramingBehavior = true;
but it does not work.
Can you help me please.
Here is my playground: Babylon.js Playground

To make it work you have to create an invisible object that encompasses the entire scene and make the camera target it then framing behavior will work

Hello :slight_smile:

If you speak about enabling checkcollisions on ArcRotateCamera, you can try this :

scene.collisionsEnabled = true;
camera.checkCollisions = true;
camera.collisionRadius = new BABYLON.Vector3(0.5, 0.5, 0.5);

Playground

++
Tricotou

1 Like

Yess !! it works.
Thank you very much.