Merge pull request #43924 from madmiraal/fix-43588-3.2

[3.2] Fix cast_motion sometimes failing
This commit is contained in:
Rémi Verschelde
2021-01-14 20:44:40 +01:00
committed by GitHub
5 changed files with 13 additions and 9 deletions

View File

@ -265,11 +265,11 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transform
continue;
}
//test initial overlap
//test initial overlap, ignore objects it's inside of.
sep_axis = p_motion.normalized();
if (!CollisionSolverSW::solve_distance(shape, p_xform, col_obj->get_shape(shape_idx), col_obj_xform, point_A, point_B, aabb, &sep_axis)) {
return false;
continue;
}
//just do kinematic solving