PhysicsBody with PhysicsShapeMesh doesn't follow specific animated mesh (disablePreStep=false)

Following up on this issue:

To further investigate and rule out potential issues with the original model file itself, I created a new, similar GLB model from scratch and tested it with the same setup.

Interestingly, I’m observing different but still incorrect behavior now. With this new model, specifically in the Playground environment:

  1. For the first few moments after the scene loads, the PhysicsBody for the hand mesh appears static at the world origin (0,0,0), even though the visual mesh is already animating correctly in its proper place.
  2. After this initial delay, the PhysicsBody does start attempting to follow the mesh, but it does so very sporadically. It seems to update its position/orientation only once every few seconds (the interval seems inconsistent), lagging significantly behind the actual mesh animation instead of synchronizing smoothly each frame.

Crucially, this sporadic synchronization behavior seems specific to the Playground. In my actual game project using the exact same model and physics setup code, the PhysicsBody for the hand mesh never updates its position after initialization. It remains completely static at its starting coordinates throughout the animation, showing no attempt to follow the mesh at all, unlike the occasional jumps seen in the Playground.

You can see this baseline sporadic behavior (in the Playground) with the new model here:
Playground Link (New Model - No Fix): https://playground.babylonjs.com/#P9N31W#1


I came across another forum thread (https://forum.babylonjs.com/t/physicsbody-controlled-by-animation/42652/4) where a user experienced lag and mentioned forcing matrix updates. Based on that, I tried adding the following code in both environments:

scene.onBeforePhysicsObservable.add(() => {
    // Assuming 'thisMesh' is the hand mesh
    thisMesh.computeWorldMatrix(true);
});

My hope was that explicitly forcing the world matrix computation just before the physics step would ensure the physics body gets the most up-to-date transform.

Unfortunately, this did not resolve the issue in either the Playground or my game. The behavior remained the same as described above (sporadic updates in PG, completely static in my game).

Here is the Playground link demonstrating that the computeWorldMatrix call didn’t change the outcome:
Updated Playground Link (New Model - With computeWorldMatrix): https://playground.babylonjs.com/#P9N31W#2


Does this difference between the Playground behavior and my actual game environment, along with the fact that computeWorldMatrix doesn’t help, offer any more clues? Could it be related to timing differences, the rendering loop, or perhaps how skinned mesh matrices are updated or accessed by the physics engine under slightly different conditions, even when disablePreStep is false?

Any further insights would be greatly appreciated!