clear the applied impulse for constraints (no warmstarting)

simplify logic, see Issue 499
This commit is contained in:
erwin.coumans 2011-04-02 00:44:15 +00:00
parent 46be84741c
commit d198451909
2 changed files with 2 additions and 2 deletions

View File

@ -172,8 +172,7 @@ bool btCollisionDispatcher::needsCollision(btCollisionObject* body0,btCollisionO
if (!(m_dispatcherFlags & btCollisionDispatcher::CD_STATIC_STATIC_REPORTED))
{
//broadphase filtering already deals with this
if ((body0->isStaticObject() || body0->isKinematicObject()) &&
(body1->isStaticObject() || body1->isKinematicObject()))
if (body0->isStaticOrKinematicObject() && body1->isStaticOrKinematicObject())
{
m_dispatcherFlags |= btCollisionDispatcher::CD_STATIC_STATIC_REPORTED;
printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n");

View File

@ -788,6 +788,7 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
{
btTypedConstraint* constraint = constraints[j];
constraint->buildJacobian();
constraint->internalSetAppliedImpulse(0.0f);
}
}
//btRigidBody* rb0=0,*rb1=0;