Fixed shaking of karts.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12137 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2012-12-02 21:16:20 +00:00
parent ea045ff8d0
commit 1b90422deb

View File

@ -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;