From 32eb2cc61ec68446e398e91dd1ef4a23f1397ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Mon, 6 Mar 2017 05:23:00 +0100 Subject: [PATCH] Complement KinematicBody2D fix >> which was done at 5fc084c28e912c54bf64645df3e6cf2cd2c30be6 --- servers/physics_2d/space_2d_sw.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 93df0a00f61..a858a20f2cc 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;