diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-15 09:49:58 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-15 09:50:27 -0300 |
commit | 52e2a1e98df9f1a7d69c2b35c7be9edc1a8e9753 (patch) | |
tree | e2aabb4d21d102ad4f6da8b47e08ea3edcdb782b /servers/physics_2d/space_2d_sw.cpp | |
parent | a7854d3ae6a81093b1cf23da3dd99b57b1aebc34 (diff) |
fixed to 2D physics, makes it work again
Diffstat (limited to 'servers/physics_2d/space_2d_sw.cpp')
-rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index e95707f135..a48b6d3827 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -714,7 +714,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co break; } - body_transform.translate(recover_motion); + body_transform.elements[2]+=recover_motion; body_aabb.pos+=recover_motion; recover_attempts--; @@ -863,7 +863,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co //it collided, let's get the rest info in unsafe advance Transform2D ugt = body_transform; - ugt.translate(p_motion*unsafe); + ugt.elements[2]+=p_motion*unsafe; _RestCallbackData2D rcd; rcd.best_len=0; |