summaryrefslogtreecommitdiff
path: root/servers/physics_2d/space_2d_sw.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-15 09:49:58 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-15 09:50:27 -0300
commit52e2a1e98df9f1a7d69c2b35c7be9edc1a8e9753 (patch)
treee2aabb4d21d102ad4f6da8b47e08ea3edcdb782b /servers/physics_2d/space_2d_sw.cpp
parenta7854d3ae6a81093b1cf23da3dd99b57b1aebc34 (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.cpp4
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;