diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-03-06 05:23:00 +0100 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-03-06 05:25:22 +0100 |
commit | 32eb2cc61ec68446e398e91dd1ef4a23f1397ee8 (patch) | |
tree | 401cd1e948ff87d1078bad5944d4171787f3a9bc /servers/physics_2d/space_2d_sw.cpp | |
parent | 5dbf1809c6e3e905b94b8764e99491e608122261 (diff) |
Complement KinematicBody2D fix
>> which was done at 5fc084c28e912c54bf64645df3e6cf2cd2c30be6
Diffstat (limited to 'servers/physics_2d/space_2d_sw.cpp')
-rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 93df0a00f6..a858a20f2c 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -557,6 +557,8 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co body_aabb = body_aabb.merge(p_body->get_shape_aabb(i)); } + // Undo the currently transform the physics server is aware of and apply the provided one + body_aabb = p_from.xform(p_body->get_inv_transform().xform(body_aabb)); body_aabb = body_aabb.grow(p_margin); Transform2D body_transform = p_from; |