ArcRotateCamera collisions

Hi,

So I noticed that collisions with the ArcRotateCamera doesn’t work well with multiple objects in the scene (and with more complex geometries it’s even worse).

Here is the playground showing that the camera doesn’t want to collide with the ground, while it’s doing quite ok with the ceiling.

How can I improve this… I was thinking to cast rays from the camera in few directions and in case of hit, set a temporary limit (upper/lower radius/beta/alpha). But then it won’t give me the nice sliding over the surface effect with camera movement.

What other choices do I have?

cc @Cedric

Hi @Jozef_Plata

This is legacy system that may not work with complex geometries.
Did you try to use Physics V2 instead? Babylon.js docs

Parenting the camera to a physics controlled shape should work better

https://doc.babylonjs.com/features/featuresDeepDive/physics/characterController/

1 Like