If I update position vector in after render call back or just sync, there will be some case that position can’t update. Now I get rid of this by setting body’s disableSync to true manually as a temp solution.
I believe the question occurs when getting bodyTransform in function syncTransform, but I cant debugger further.
disableSync to true means no update of mesh/scene graph transform from the physics. So the node translation/orientation is not overwritten by the physics.
Can you please try to make a small repo? I’m not sure to fully understand.
Sorry I dont make myself clear. In the origin pg (#1, in document), transforms’ positions are updated in onBeforeRenderObservable and works well. In my playground, I try to update transforms’ positions in onAfterRenderObservable or in sync and did not change anything else, but failed.
I was wondering if it is expected we can only update position of disableSync to true bodies in beforeRender but not afterRender nor in sync?