-
I am currently debugging a crash that happens when a body is added/removed/destroyed from the world between state restores. As a starting point, one pattern is visible, which I would like to ask about: World steps:
Now, the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
State saving only saves the part of the state that the simulation itself changes (position, velocity etc.). Everything you change through an API call (e.g. |
Beta Was this translation helpful? Give feedback.
State saving only saves the part of the state that the simulation itself changes (position, velocity etc.). Everything you change through an API call (e.g.
RemoveBody
,SetFriction
etc.) is not saved with the state and needs to be restored manually. So in this case you need to re-add the body yourself if you removed it. It needs to be added before calling restore state. State saving is meant to save the absolute minimum needed to sync the state over a network.