You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 17:36:07 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user