Physics problem in latest version

Hi All,
Gltf physics example seems to have some issues when using babylon latest version 5.
https://playground.babylonjs.com/#FD65RR
It falls through mesh and stops a bit below like the imposter is offset-ed.
Can anyone confirm?

1 Like

Got the same result here on Edge, seems to be related to how the impostors are set? If I change the mesh impostor to a simple box impostor instead of a composite impostor like the one in the example, it works fine: Physic impostor changes? | Babylon.js Playground (babylonjs.com)

@RaananW did something change in the impostors between 4 and 5?

1 Like

Huh. if I enable the composite impostors from before, but comment the physicsRoot.position.y = 3 line, the collisions work as expected, even if I change the y pos on the inspector, it falls and collides with the ground as expected.

EDIT: I wonder if it’s something related to parent-child calculations?

EDIT 2: Also works if I set the parent mesh’s position in a setTimeout: Physic impostor changes? | Babylon.js Playground (babylonjs.com)

1 Like

Thanks @carolhmj for looking into it. I was hoping to try out my little project in v5 and this could be nice way around before fix. Also should help find out whats the issue.

1 Like

Also if you call physicsRoot.refreshBoundingInfo() after adding its children, before setting its position, then it works without the timeout too.
https://playground.babylonjs.com/#FD65RR#101

There was a recent Issue with ribbon physics that smells related. @Cedric might know?

2 Likes

Let me take a look. I think something went wrong with compounds and my latest change.

2 Likes

PR

3 Likes