270
276
// calculate j that moves us to zero relative velocity
271
277
btScalar j = -vrel * cpd->m_jacDiagABInvTangent0;
272
278
btScalar total = cpd->m_accumulatedTangentImpulse0 + j;
275
281
j = total - cpd->m_accumulatedTangentImpulse0;
276
282
cpd->m_accumulatedTangentImpulse0 = total;
277
283
body1.applyImpulse(j * cpd->m_frictionWorldTangential0, rel_pos1);