Used existing (but unused) support for material specific friction
to disable friction on certain materials (indicated by a friction value of 10000 or higher). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6597 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
18f8b831aa
commit
59eac9c1d5
@ -1394,7 +1394,11 @@ void Kart::updatePhysics(float dt)
|
||||
float friction = 1.0f;
|
||||
bool enableSkidding = false;
|
||||
|
||||
if (isOnGround())
|
||||
// If a material has friction of more than 10000 treat this
|
||||
// as no-skidding possible. This way the current skidding
|
||||
// handling can be disabled for certain material (e.g. the
|
||||
// curve in skyline on which otherwise karts could not drive).
|
||||
if (isOnGround() && getMaterial()->getFriction()<10000.0f)
|
||||
{
|
||||
const btMatrix3x3 &m = m_vehicle->getChassisWorldTransform().getBasis();
|
||||
// To get the angle between up=(0,1,0), we have to do:
|
||||
|
Loading…
Reference in New Issue
Block a user