Try tp reduce sudden rotation after a collision, and reduce frequencies
of kart being pushed into the air.
This commit is contained in:
parent
0f37f7cdc0
commit
9a5eec3761
@ -2043,7 +2043,10 @@ void Kart::crashed(const Material *m, const Vec3 &normal)
|
||||
impulse *= ( abs_speed<10 ? 10.0f : sqrt(abs_speed) )
|
||||
* m_kart_properties->getCollisionTerrainImpulse();
|
||||
m_bounce_back_time = 0.2f;
|
||||
m_vehicle->setTimedCentralImpulse(0.1f, impulse);
|
||||
m_bounce_back_time = 0.0f;;
|
||||
impulse = Vec3(0, 0, 0);
|
||||
//m_vehicle->setTimedCentralImpulse(0.1f, impulse);
|
||||
m_vehicle->setTimedCentralImpulse(0.0, impulse);
|
||||
}
|
||||
// If there is a quad graph, push the kart towards the previous
|
||||
// graph node center (we have to use the previous point since the
|
||||
|
@ -675,7 +675,7 @@ void btKart::updateSuspension(btScalar deltaTime)
|
||||
// force is used, which makes it much less likely for the kart to hit
|
||||
// the terrain, while when driving on flat terrain (length small),
|
||||
// there is hardly any difference
|
||||
length_diff *= f*f;
|
||||
//length_diff *= f*f;
|
||||
force = wheel_info.m_suspensionStiffness * length_diff
|
||||
* wheel_info.m_clippedInvContactDotSuspension;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user