Code: Select all
if(bounce > btScalar(0.0))
{
btScalar vel = linVelA.dot(ax1);
vel -= linVelB.dot(ax1);
vel *= signFact;
// only apply bounce if the velocity is incoming, and if the
// resulting c[] exceeds what we already have.
if(limit == 1)
{ // low limit
////if(vel < 0)
{
btScalar newc = -bounce * vel;
////if (newc > info->m_constraintError[srow])
{
info->m_constraintError[srow] = newc;
}
}
}
else
{ // high limit - all those computations are reversed
////if(vel > 0)
{
btScalar newc = -bounce * vel;
////if(newc < info->m_constraintError[srow])
{
info->m_constraintError[srow] = newc;
}
}
}
}
BTW: Most of the slider parameters are only used in the obsolete constraint methods.