diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-02-15 08:29:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-02-15 08:34:02 -0300 |
commit | da11d6d9e868db674cb18ced0544c84e3356be8d (patch) | |
tree | cfc9ce1235e34c0fee160e00c340a1163474a024 /servers/physics_2d | |
parent | d7fd86d51aadda665667c88dca657993f0de14d7 (diff) |
Many fixes to make exported scenes work better, still buggy.
Diffstat (limited to 'servers/physics_2d')
-rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index a48b6d3827..275137ae5a 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -622,6 +622,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co Transform2D body_transform = p_from; + { //STEP 1, FREE BODY IF STUCK @@ -645,6 +646,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co bool collided=false; + int amount = _cull_aabb_for_body(p_body,body_aabb); for(int j=0;j<p_body->get_shape_count();j++) { @@ -682,11 +684,13 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co } - if (!collided) + if (!collided) { break; + } Vector2 recover_motion; + for(int i=0;i<cbk.amount;i++) { Vector2 a = sr[i*2+0]; |