No collision on ellispoid

This might be an issue, or might not be, so I’m putting it in the “Bugs” category.

Hi again, I was making a building and noticed something that might be unintended. The camera ellipsoid doesn’t have any collision on the top of it. (I think)

To show, go to, it’s my personal website for testing. Look around, and you should see a floating structure somewhere. WASD is move, mouse is look(obviously), shift is move faster, hold c to crouch, and press f to toggle free cam.

go into free cam, and move over to the floating structure. stand on it, and try to go in it. You will clip you head through the top. here is a gif:collision%20gif

sorry about the framerate. a 55 second long gif is huge and I had to fit it in somehow.
in the gif I demonstrate that it has collision, even the “top” but I clip through. use “f” to fly(it toggles)


this is just too big to check without a playground :slight_smile:

But did you make sure to use the ellipsoidOffset? It is used to offset the camera (because else the camera will be in the center of the ellipsoid)
Check the doc here: Cameras, Mesh Collisions and Gravity - Babylon.js Documentation

i can try to make a playground, but It will have to be without the custom structure. Also notice how the camera gets jittery when in the object?

The jittery often relates to the system trying to get out of an impossible state.

I would recommend to perhaps make the ellipsoid a bit higher and plays with the offset to make it look good

Here is a playground:

If you go under the box you get stuck!

here we are:

This is mostly because we use a specific optimization regarding collisions with only front faces and thus limit edge cases can be false positives. To help the system we just need to create bigger ellipsoids and compensate with the offset

1 Like

thanks for the help! (again…)

1 Like

Always a pleasure!