Attempt to fix "Regression in friction and damping behaviour" , see issue 752
Thanks to Sergej Reich for the report and narrowing down the breaking revision!
This commit is contained in:
@@ -973,6 +973,8 @@ void btDiscreteDynamicsWorld::integrateTransforms(btScalar timeStep)
|
||||
if (body->isActive() && (!body->isStaticOrKinematicObject()))
|
||||
{
|
||||
|
||||
body->applyDamping(timeStep);
|
||||
|
||||
body->predictIntegratedTransform(timeStep, predictedTrans);
|
||||
|
||||
btScalar squareMotion = (predictedTrans.getOrigin()-body->getWorldTransform().getOrigin()).length2();
|
||||
@@ -1119,8 +1121,6 @@ void btDiscreteDynamicsWorld::predictUnconstraintMotion(btScalar timeStep)
|
||||
{
|
||||
//don't integrate/update velocities here, it happens in the constraint solver
|
||||
|
||||
//damping
|
||||
body->applyDamping(timeStep);
|
||||
|
||||
body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user