diff --git a/Demos/ColladaDemo/ColladaDemo.cpp b/Demos/ColladaDemo/ColladaDemo.cpp index 01d522913..0e7956271 100644 --- a/Demos/ColladaDemo/ColladaDemo.cpp +++ b/Demos/ColladaDemo/ColladaDemo.cpp @@ -188,7 +188,10 @@ void ColladaDemo::clientMoveAndDisplay() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - m_dynamicsWorld->stepSimulation(deltaTime); + float dt = m_clock.getTimeMilliseconds() * 0.001f; + m_clock.reset(); + + m_dynamicsWorld->stepSimulation(dt); renderme(); diff --git a/Demos/ConstraintDemo/ConstraintDemo.cpp b/Demos/ConstraintDemo/ConstraintDemo.cpp index e93c37fa3..a2ba68381 100644 --- a/Demos/ConstraintDemo/ConstraintDemo.cpp +++ b/Demos/ConstraintDemo/ConstraintDemo.cpp @@ -95,9 +95,11 @@ void ConstraintDemo::clientMoveAndDisplay() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - float deltaTime = 1.f/60.f; + float dt = m_clock.getTimeMilliseconds() * 0.001f; + m_clock.reset(); - m_dynamicsWorld->stepSimulation(deltaTime); + + m_dynamicsWorld->stepSimulation(dt); renderme(); glFlush(); diff --git a/Demos/ConvexDecompositionDemo/ConvexDecompositionDemo.cpp b/Demos/ConvexDecompositionDemo/ConvexDecompositionDemo.cpp index 322354812..e203f1d49 100644 --- a/Demos/ConvexDecompositionDemo/ConvexDecompositionDemo.cpp +++ b/Demos/ConvexDecompositionDemo/ConvexDecompositionDemo.cpp @@ -295,8 +295,10 @@ void ConvexDecompositionDemo::clientMoveAndDisplay() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + float dt = m_clock.getTimeMilliseconds() * 0.001f; + m_clock.reset(); - m_dynamicsWorld->stepSimulation(deltaTime); + m_dynamicsWorld->stepSimulation(dt); renderme();