Merge pull request #43923 from madmiraal/fix-43588
Fix cast_motion sometimes failing
This commit is contained in:
commit
011d201046
5 changed files with 13 additions and 9 deletions
|
|
@ -278,9 +278,9 @@ bool PhysicsDirectSpaceState2DSW::cast_motion(const RID &p_shape, const Transfor
|
|||
continue;
|
||||
}
|
||||
|
||||
//test initial overlap
|
||||
//test initial overlap, ignore objects it's inside of.
|
||||
if (CollisionSolver2DSW::solve(shape, p_xform, Vector2(), col_obj->get_shape(shape_idx), col_obj_xform, Vector2(), nullptr, nullptr, nullptr, p_margin)) {
|
||||
return false;
|
||||
continue;
|
||||
}
|
||||
|
||||
//just do kinematic solving
|
||||
|
|
|
|||
|
|
@ -274,11 +274,11 @@ bool PhysicsDirectSpaceState3DSW::cast_motion(const RID &p_shape, const Transfor
|
|||
continue;
|
||||
}
|
||||
|
||||
//test initial overlap
|
||||
//test initial overlap, ignore objects it's inside of.
|
||||
sep_axis = p_motion.normalized();
|
||||
|
||||
if (!CollisionSolver3DSW::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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue