summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-06-24 22:58:46 +0200
committerGitHub <noreply@github.com>2019-06-24 22:58:46 +0200
commit29cddef895bf767f715bd3e5f90aa786d2c3c895 (patch)
treeac699530c405d4f3ee6cdb80d4116e9eb6143777
parent603e87e2bb28e9f344dec479ca546978b820e1f9 (diff)
parentb2d433c4a81f148e2c022fcdef10f903029b6347 (diff)
Merge pull request #29940 from jonri/fix-vehicle-contact
Prevent VehicleBody contact damping from exceeding the baseline value…
-rw-r--r--scene/3d/vehicle_body.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index 32b8219ee0..55bb7eabd9 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -585,7 +585,7 @@ void VehicleBody::_resolve_single_bilateral(PhysicsDirectBodyState *s, const Vec
if (p_rollInfluence > 0.0) {
// !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
- contactDamping = s->get_step() / p_rollInfluence;
+ contactDamping = MIN(contactDamping, s->get_step() / p_rollInfluence);
}
#define ONLY_USE_LINEAR_MASS