Skip to content

Snapshot and rollback state? #202

Answered by RossNordby
R-WebsterNoble asked this question in Q&A
Discussion options

You must be logged in to vote

There are multiple levels this could be implemented at, with increasing levels of difficulty.

The easiest would be to simply copy body poses and velocities for all bodies, and upon rollback, just copy those states. There's a little bit of extra complexity in tracking changes- perhaps a body has been added since the rollback target; that'd need to be explicitly tracked too. To keep things simple, you'd probably want to wake up every body that has its state set so that all the other internal state (like collision constraints) gets updated appropriately.

Another step would be to copy accumulated impulses for all constraints. These are guesses at the solution to constraints that the solver ke…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by R-WebsterNoble
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants