diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index 2786c5de3..12f6c097a 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -1142,6 +1142,14 @@ void Kart::updatePhysics(float dt) //float orientation = getHeading(); //m_body->applyCentralImpulse(btVector3(-60.0f*sin(orientation), 0.0, -60.0f*cos(orientation))); } + + // dampen any roll while flying, makes the kart hard to control + btVector3 velocity = m_body->getAngularVelocity(); + const float z = velocity.z(); + if (z > 0.1f) velocity.setZ(z - 0.1f); + else if (z < -0.1f) velocity.setZ(z + 0.1f); + else velocity.setZ(0); + m_body->setAngularVelocity(velocity); }