From 0309615b49e00436add006d6501bd5454b760d72 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Sun, 10 Jan 2021 10:35:44 -0800 Subject: [PATCH] btRaycastVehicle.cpp: forward impulse way too strong when sideImpulse==0 --- src/BulletDynamics/Vehicle/btRaycastVehicle.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp b/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp index fc70d8e637..b23c9d9b0f 100644 --- a/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp +++ b/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp @@ -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; } } }