Incorrect size of physics body

Version: 7.6.2

using this code to create physics body of mesh, but resulting physics body is much larger than the source mesh

new BABYLON.PhysicsAggregate(mesh, BABYLON.PhysicsShapeType.BOX, {
    mass: 1,

Step to reproduce:

  1. Open the playground
  2. Open Inspector
  3. Check Debug → HELPERS → Physics


check this

I want to change it to a smaller face, but it’s not accurate.

cc @Cedric

I’ll take a look in the coming days.

1 Like
1 Like

The playground after PR:

After a few clicks to the mesh, makes it something like Physics body on different position with mesh

It looks like an unnormalized quaternion. I’ll take a closer look these coming days.

1 Like

I’ve spent some time again today to improve the current state with no good results. It’s a nice combination of negative and non uniform scaling. It’s not just about physics, it’s about the glb hierarchy and the way the engine does its computation.
For example, just using the inspector, I can have a skrewed matrix at the end. This is even with Right Hand system, to simplify the work a little.

So, I’m sorry to repeat myself but bake the transforms, use non negative/uniform scaling…