diff options
author | Ricardo Buring <ricardo.buring@gmail.com> | 2022-04-28 22:44:09 +0200 |
---|---|---|
committer | Ricardo Buring <ricardo.buring@gmail.com> | 2022-05-18 16:40:29 +0200 |
commit | f072aa69a99a436b711afeb4b2b1c10b93883606 (patch) | |
tree | 1fab336eed96d0da16923fcbe54c5a5b3500cb45 /servers/physics_3d | |
parent | cdc5da746032c2caad8539480514f444bb1eb1ad (diff) |
Add motion parameter to toggle whether recovery is reported as a collision
This makes the intent explicit in each use case.
Diffstat (limited to 'servers/physics_3d')
-rw-r--r-- | servers/physics_3d/godot_space_3d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_3d/godot_space_3d.cpp b/servers/physics_3d/godot_space_3d.cpp index 9c051b23f6..2bdaf581a1 100644 --- a/servers/physics_3d/godot_space_3d.cpp +++ b/servers/physics_3d/godot_space_3d.cpp @@ -906,7 +906,7 @@ bool GodotSpace3D::test_body_motion(GodotBody3D *p_body, const PhysicsServer3D:: } bool collided = false; - if (recovered || (safe < 1)) { + if ((p_parameters.recovery_as_collision && recovered) || (safe < 1)) { if (safe >= 1) { best_shape = -1; //no best shape with cast, reset to -1 } |