moveWithCollisions clipping inside of the colliders

This is a continuation of Using moveWithCollisions with imported GLTF boxes.

The scene is using a right handed system, but switching to the default left has the same result.

Previously I did not mind the inaccuracy with the collisions. However, now I’m in a situation where I’d like them to be perfect if possible.

In my webpack project (different scene, different scale) the opposite happens, instead of clipping into the collider it keeps a short distance. Both showing some kind of inaccuracy.

Is there something that needs to be recalculated?

Any help appreciated :slight_smile:

You have to set ellipsoid of Mesh to apply collision precisely:

this.mesh.ellipsoid = new BABYLON.Vector3(1, 1, 1); // Collision Ellipsoid of your Player

Example with Playgrounds:

1 Like

Amazing, would’ve never figured that out on my own. Thank you so much!