I haven't checked the code yet (sorry if I am being impolite by asking) but does bullet currently have functionality for restoring past states?
If not, how hard would it be to save the current world state entirely (from inside the Bullet engine)? If the memory requirements are not insane I'll need to implement a cataloging of past states. I would store the state after every tick in some fixed circular buffer. Perhaps only saving for every n ticks and simulating the difference would be ideal.
Otherwise, how well does bullet simulate backwards in time? This seems quite dangerous from a determinacy point of view though.)
Unwinding the simulation
-
- Posts: 30
- Joined: Thu Feb 09, 2012 2:39 am
Re: Unwinding the simulation
I'm interested too, it appears bodies' motion state are not saved/imported.
Any help is appreciated
Any help is appreciated
-
- Posts: 17
- Joined: Tue Jan 24, 2012 5:39 am
Re: Unwinding the simulation
What is the need for this? I'm guessing network code (wind back, apply change, wind forward), as used by various games, and pioneered (as far as I'm aware) by John Carmack?
-
- Posts: 225
- Joined: Wed Jan 07, 2009 11:43 am
- Location: London
Re: Unwinding the simulation
Bullet doesn't (can't) simulate backwards in time (don't think any physics engines can as there are a multitude of possible states). I think most games do what you suggest and store off a chunk of previous inputs so they can be replayed forwards from that point.