The physical body lags behind the mesh movement

Hello.

The problem is that when moving the grid by changing its position, the physical body associated with it seems to lag behind. But at the same time, if I move the mesh using the PositionGizmo, then I do not observe the lag between the physical body and the mesh.

What needs to be done to ensure that the physical body does not lag behind when the mesh position changes?

Reference playground: https://playground.babylonjs.com/#8VCLL1#1

@carolhmj and @Cedric migtht be able to help on this one

You can do the change after rendering so everything will be in sync when the next frame starts:

3 Likes

Thank you

1 Like