Skip to content

Commit

Permalink
btRaycastVehicle.cpp: forward impulse way too strong when sideImpulse==0
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jan 10, 2021
1 parent df09fd9 commit 0309615
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/BulletDynamics/Vehicle/btRaycastVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,13 +609,10 @@ void btRaycastVehicle::updateFriction(btScalar timeStep)
{
for (int wheel = 0; wheel < getNumWheels(); wheel++)
{
if (m_sideImpulse[wheel] != btScalar(0.))
if (m_wheelInfo[wheel].m_skidInfo < btScalar(1.))
{
if (m_wheelInfo[wheel].m_skidInfo < btScalar(1.))
{
m_forwardImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo;
m_sideImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo;
}
m_forwardImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo;
m_sideImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo;
}
}
}
Expand Down

0 comments on commit 0309615

Please sign in to comment.