btMultiBody: fix indexing issue causing wrong friction to be reported (has no effect, since we don't use warmstarting for multibody)
This commit is contained in:
@@ -1232,7 +1232,7 @@ void btMultiBodyConstraintSolver::convertMultiBodyContact(btPersistentManifold*
|
|||||||
/////setup the friction constraints
|
/////setup the friction constraints
|
||||||
#define ENABLE_FRICTION
|
#define ENABLE_FRICTION
|
||||||
#ifdef ENABLE_FRICTION
|
#ifdef ENABLE_FRICTION
|
||||||
solverConstraint.m_frictionIndex = frictionIndex;
|
solverConstraint.m_frictionIndex = m_multiBodyFrictionContactConstraints.size();
|
||||||
|
|
||||||
///Bullet has several options to set the friction directions
|
///Bullet has several options to set the friction directions
|
||||||
///By default, each contact has only a single friction direction that is recomputed automatically every frame
|
///By default, each contact has only a single friction direction that is recomputed automatically every frame
|
||||||
@@ -1501,7 +1501,12 @@ btScalar btMultiBodyConstraintSolver::solveGroupCacheFriendlyFinish(btCollisionO
|
|||||||
if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
|
if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
|
||||||
{
|
{
|
||||||
pt->m_appliedImpulseLateral2 = m_multiBodyFrictionContactConstraints[solverConstraint.m_frictionIndex + 1].m_appliedImpulse;
|
pt->m_appliedImpulseLateral2 = m_multiBodyFrictionContactConstraints[solverConstraint.m_frictionIndex + 1].m_appliedImpulse;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
pt->m_appliedImpulseLateral2 = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//do a callback here?
|
//do a callback here?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user