Add motion parameter to toggle whether recovery is reported as a collision
This makes the intent explicit in each use case.
This commit is contained in:
parent
cdc5da7460
commit
f072aa69a9
10 changed files with 45 additions and 26 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue