Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2007-05-07 21:10:44 +0400
committerErwin Coumans <blender@erwincoumans.com>2007-05-07 21:10:44 +0400
commitd814e2b9c6ca935e8259360b4d3a6c4ad6dd0733 (patch)
treed05d955f5f46f499559680166eeae859c24b6713 /source/gameengine/Physics
parentf638895aad318a2d480acccc66328c94c8c638fd (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/Physics')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp8
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++)
{