diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2007-05-07 21:10:44 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2007-05-07 21:10:44 +0400 |
commit | d814e2b9c6ca935e8259360b4d3a6c4ad6dd0733 (patch) | |
tree | d05d955f5f46f499559680166eeae859c24b6713 /source/gameengine | |
parent | f638895aad318a2d480acccc66328c94c8c638fd (diff) |
two minor changes, hopefully before release:
- reset randseed, which should make simulations more predictable
- re-activate substeps (for more accurate simulations)
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 34894128690..bc69fe85eff 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -458,8 +458,12 @@ bool CcdPhysicsEnvironment::proceedDeltaTime(double curTime,float timeStep) ctrl->SynchronizeMotionStates(timeStep); } - m_dynamicsWorld->stepSimulation(timeStep,0);//perform always a full simulation step - + float subStep = timeStep / float(m_numTimeSubSteps); + for (i=0;i<m_numTimeSubSteps;i++) + { + m_dynamicsWorld->stepSimulation(subStep,0);//perform always a full simulation step + } + numCtrl = GetNumControllers(); for (i=0;i<numCtrl;i++) { |