summaryrefslogtreecommitdiff
path: root/servers/physics_2d/collision_solver_2d_sw.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-10 22:25:45 -0300
committerGitHub <noreply@github.com>2017-01-10 22:25:45 -0300
commit6671670e8162bc2dba1382a7b50f1c089ca3df17 (patch)
treec674668d2a678d6d8fe56e638ed5b5b5bf06a57a /servers/physics_2d/collision_solver_2d_sw.cpp
parent0acd4fccd566fdb074aebac01046b1e80c64b2dc (diff)
parentf271591ac22bd07e1b2316448dd6e9af879c218f (diff)
Merge pull request #7445 from tagcup/2d_math_fixes
Various corrections in 2D math.
Diffstat (limited to 'servers/physics_2d/collision_solver_2d_sw.cpp')
-rw-r--r--servers/physics_2d/collision_solver_2d_sw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp
index 0ad519c9d1..079b0499c2 100644
--- a/servers/physics_2d/collision_solver_2d_sw.cpp
+++ b/servers/physics_2d/collision_solver_2d_sw.cpp
@@ -203,14 +203,14 @@ bool CollisionSolver2DSW::solve_concave(const Shape2DSW *p_shape_A,const Matrix3
cinfo.aabb_tests=0;
Matrix32 rel_transform = p_transform_A;
- rel_transform.elements[2]-=p_transform_B.elements[2];
+ rel_transform.translate(-p_transform_B.get_origin());
//quickly compute a local Rect2
Rect2 local_aabb;
for(int i=0;i<2;i++) {
- Vector2 axis( p_transform_B.elements[i] );
+ Vector2 axis( p_transform_B.get_axis(i) );
float axis_scale = 1.0/axis.length();
axis*=axis_scale;