Fix cast_motion sometimes failing
- Fixes Godot physics failing when the cast Shape is inside of, or already colliding with another Shape. - Fixes Bullet physics failing when there is no motion. - Ensures Godot and Bullet physics behave the same. - Updates the documentation to exclude the caveats for the failures and differences.
This commit is contained in:
@ -269,10 +269,10 @@ bool Physics2DDirectSpaceStateSW::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(), NULL, NULL, NULL, p_margin)) {
|
||||
|
||||
return false;
|
||||
continue;
|
||||
}
|
||||
|
||||
//just do kinematic solving
|
||||
|
||||
Reference in New Issue
Block a user