summaryrefslogtreecommitdiff
path: root/scene/3d/physics_body_3d.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-19 22:01:54 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-19 22:01:54 +0200
commite696360a1b25339e7a7dd2434e17f052d934c73d (patch)
tree3817e0cb2439a7a858963bab03f5580be359f73e /scene/3d/physics_body_3d.cpp
parent82961dda3dbc2707777741711daf592094f0738f (diff)
parent1937e030b59e08572d9e275183df8b65fdfd9393 (diff)
Merge pull request #63653 from fabriceci/increase-max-collisions
Increases the number of maximum detected collisions
Diffstat (limited to 'scene/3d/physics_body_3d.cpp')
-rw-r--r--scene/3d/physics_body_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp
index 0c5385dcbe..17115cb153 100644
--- a/scene/3d/physics_body_3d.cpp
+++ b/scene/3d/physics_body_3d.cpp
@@ -1273,7 +1273,7 @@ void CharacterBody3D::_move_and_slide_grounded(double p_delta, bool p_was_on_flo
for (int iteration = 0; iteration < max_slides; ++iteration) {
PhysicsServer3D::MotionParameters parameters(get_global_transform(), motion, margin);
- parameters.max_collisions = 4;
+ parameters.max_collisions = 6; // There can be 4 collisions between 2 walls + 2 more for the floor.
PhysicsServer3D::MotionResult result;
bool collided = move_and_collide(parameters, result, false, !sliding_enabled);