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_2d | |
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_2d')
-rw-r--r-- | servers/physics_2d/godot_space_2d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_2d/godot_space_2d.cpp b/servers/physics_2d/godot_space_2d.cpp index 731eab2dfe..0a7859d86a 100644 --- a/servers/physics_2d/godot_space_2d.cpp +++ b/servers/physics_2d/godot_space_2d.cpp @@ -874,7 +874,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: 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 } |