Hopefully fix #2939 (backpedal animation flickers when stopping and

left/right is being pressed).
This commit is contained in:
hiker 2017-10-23 08:44:17 +11:00
parent 7f1c460227
commit 4c1874ebf8

View File

@ -705,7 +705,9 @@ btScalar btKart::calcRollingFriction(btWheelContactPoint& contactPoint)
btScalar vrel = contactPoint.m_frictionDirectionWorld.dot(vel); btScalar vrel = contactPoint.m_frictionDirectionWorld.dot(vel);
// calculate j that moves us to zero relative velocity // calculate j that moves us to zero relative velocity
btScalar j1 = -vrel * contactPoint.m_jacDiagABInv; // Note that num_wheels_on_ground > 0 since this function is called
// for wheels that touch the ground/
btScalar j1 = -vrel * contactPoint.m_jacDiagABInv / m_num_wheels_on_ground;
btSetMin(j1, maxImpulse); btSetMin(j1, maxImpulse);
btSetMax(j1, -maxImpulse); btSetMax(j1, -maxImpulse);