Record a Statement in BULLET !

momoreda
Posts: 25
Joined: Mon Oct 08, 2007 2:09 pm
Location: France

Record a Statement in BULLET !

Post by momoreda »

Good day everybody !

is it possible in BULLET to record a statement in a something like variable and resume when we want (Outside the function keyboardCallback) ?

Thanks for your helo
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Record a Statement in BULLET !

Post by Erwin Coumans »

'record a statement', what do you exactly mean by that?

Thanks,
Erwin
momoreda
Posts: 25
Joined: Mon Oct 08, 2007 2:09 pm
Location: France

Re: Record a Statement in BULLET !

Post by momoreda »

Thank you very much for your replay

In fact, I need to identify whether BULLET performs two modes:
• “The Replay mode: lets you replay a state record like a movie”
• “The Freeze mode: Stops all movements & animations so that you can program a new home point or new sleep point.”

for the mode Freeze mode i think the answer is yes, since in the demo when we press "i" in the keyboard the simulation is paused. But for the other mode i don't have any idea !

If you want more precision don't hesitate to ask me.

thanks you ! :D
AlexSilverman
Posts: 141
Joined: Mon Jul 02, 2007 5:12 pm

Re: Record a Statement in BULLET !

Post by AlexSilverman »

Hello,

I tried to tackle replay mode by choosing a point in time when the replay will begin, and storing object positions, orientations, and velocities (linear and angular) at that time, and resetting objects to those stored values when the time comes to do a replay. This works very nearly all the time. There are some edge cases where the replay is different, but I suspect that's due to Bullet not being perfectly deterministic unless you reset the entire simulation (discussed here). My replay only has one object flying through space with some simulated wind resistance, so there isn't much room for divergence, but I suppose if you have a more complicated scenario, the differences between the original and the replay could be more noticeable.

Hope that helps.

- Alex