Browse Source

Merge pull request #29940 from jonri/fix-vehicle-contact

Prevent VehicleBody contact damping from exceeding the baseline value…
Rémi Verschelde 6 years ago
parent
commit
29cddef895
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/3d/vehicle_body.cpp

+ 1 - 1
scene/3d/vehicle_body.cpp

@@ -585,7 +585,7 @@ void VehicleBody::_resolve_single_bilateral(PhysicsDirectBodyState *s, const Vec
 	if (p_rollInfluence > 0.0) {
 	if (p_rollInfluence > 0.0) {
 		// !BAS! But seeing we apply this frame by frame, makes more sense to me to make this time based
 		// !BAS! But seeing we apply this frame by frame, makes more sense to me to make this time based
 		// keeping in mind our anti roll factor if it is set
 		// keeping in mind our anti roll factor if it is set
-		contactDamping = s->get_step() / p_rollInfluence;
+		contactDamping = MIN(contactDamping, s->get_step() / p_rollInfluence);
 	}
 	}
 
 
 #define ONLY_USE_LINEAR_MASS
 #define ONLY_USE_LINEAR_MASS