Camera bounces back when colliding with meshes (Camera Collisions)


Here is the playground. Try to bump into the meshes of the seats and you will see the camera bounce back

I would like the seats meshes collisions to be similar to wall collisions. So they just block my path

Please do not remove Ammo, as it is necessary

It happens because inside your model there are a lot of BIG bounding boxes inside it (which are actually MUCH bigger than than their relevant meshes which you would like to collide with).

As one may see, the bounding box of the round seat takes more than half of the room; the same with all other seats, so camera will bounce back and forth in a painful attempt to find a resting point… The best solution is to rework the 3D model so meshes’ origin and their bounding size would be more suitable for use in your application.
Also, if you set gravity.y to -0.1, camera behaves much better -


Thanks for the answer!

Could you answer one more question?

What about the front desk? This is also part of the furniture, but collisions with it are normal

The desk is just higher. Also it depends on camera.ellipsoid size, especially on its Y value.
Here - with some extra settings which you may tweak - the situation is better:

1 Like

Thanks for the answer!

The gravity option works well. But the camera turns out to be a little flying

Is there some way to save the y position of the camera, say by 1, but so that the collision of the camera is at 0.2, as in this example?

You may tune camera.ellipsoidOffset property as here -


Thanks a lot for your support!

That’s all I needed to know. I think the best solution out of the proposed all this will be the reworking of the 3D model, so I will mark this solution with an answer.


@labris, you rock !!!

1 Like