From 1b90422deb872be56f939d606e8d53b658388373 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Sun, 2 Dec 2012 21:16:20 +0000 Subject: [PATCH] Fixed shaking of karts. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12137 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/physics/btKart.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/physics/btKart.cpp b/src/physics/btKart.cpp index 627f0ee8c..640bce8f1 100644 --- a/src/physics/btKart.cpp +++ b/src/physics/btKart.cpp @@ -727,9 +727,10 @@ void btKart::updateFriction(btScalar timeStep) // bullet then tries to offset by applying a backward // impulse - which is a bit too big, causing a impulse // backwards, ... till the kart is shaking backwards and - // forwards + // forwards. By onlyu applying half of the impulse in cae + // of low friction this goes away. if(wheelInfo.m_brake && fabsf(rollingFriction)<10) - rollingFriction=0; + rollingFriction*=0.5f; } m_forwardImpulse[wheel] = rollingFriction;