mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-09 09:00:08 +00:00
clear the applied impulse for constraints (no warmstarting)
simplify logic, see Issue 499
This commit is contained in:
parent
46be84741c
commit
d198451909
@ -172,8 +172,7 @@ bool btCollisionDispatcher::needsCollision(btCollisionObject* body0,btCollisionO
|
|||||||
if (!(m_dispatcherFlags & btCollisionDispatcher::CD_STATIC_STATIC_REPORTED))
|
if (!(m_dispatcherFlags & btCollisionDispatcher::CD_STATIC_STATIC_REPORTED))
|
||||||
{
|
{
|
||||||
//broadphase filtering already deals with this
|
//broadphase filtering already deals with this
|
||||||
if ((body0->isStaticObject() || body0->isKinematicObject()) &&
|
if (body0->isStaticOrKinematicObject() && body1->isStaticOrKinematicObject())
|
||||||
(body1->isStaticObject() || body1->isKinematicObject()))
|
|
||||||
{
|
{
|
||||||
m_dispatcherFlags |= btCollisionDispatcher::CD_STATIC_STATIC_REPORTED;
|
m_dispatcherFlags |= btCollisionDispatcher::CD_STATIC_STATIC_REPORTED;
|
||||||
printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n");
|
printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n");
|
||||||
|
@ -788,6 +788,7 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
|
|||||||
{
|
{
|
||||||
btTypedConstraint* constraint = constraints[j];
|
btTypedConstraint* constraint = constraints[j];
|
||||||
constraint->buildJacobian();
|
constraint->buildJacobian();
|
||||||
|
constraint->internalSetAppliedImpulse(0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//btRigidBody* rb0=0,*rb1=0;
|
//btRigidBody* rb0=0,*rb1=0;
|
||||||
|
Loading…
Reference in New Issue
Block a user