Deterministic in games

Show what you made with Bullet Physics SDK: Games, Demos, Integrations with a graphics engine, modeler or any other application
Post Reply
Rope
Posts: 3
Joined: Tue Sep 11, 2012 9:57 am

Deterministic in games

Post by Rope »

Hello, Erwin :)
I developed a game about billiard. In the games I need to pre-integrate the position of balls.
And draw out their paths in the future.
When player check out their path, I will restore all ball's position and state.
But I always get the different result after integrating(fixed step time).
:?

Step as follow:
1. remove all balls and create new balls
2. restore ball's position
3. pDiscreteDynamicWorld->getConstraintSolver()->reset();
4. ppDiscreteDynamicWorld->clearForces();
5. pDiscreteDynamicWorld->getBroadphase()->resetPool(pDiscreteDynamicWorld->getDispatcher())

How to get the same result after integrating.
Thank you.
Post Reply