From ff57aea85321f9ec6411dcb5228162cf3801b51d Mon Sep 17 00:00:00 2001 From: Leandro Dorileo Date: Mon, 3 Dec 2012 21:29:21 +0000 Subject: [PATCH] EPhysics: fix y orientation issues Fix a small issue on y orientation on triangles_inside_get and soft body impulse. --This line, and those below, will be ignored-- SVN revision: 80106 --- legacy/ephysics/src/lib/ephysics_body.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp index afce7883bc..d85c521560 100644 --- a/legacy/ephysics/src/lib/ephysics_body.cpp +++ b/legacy/ephysics/src/lib/ephysics_body.cpp @@ -2315,7 +2315,7 @@ ephysics_body_soft_body_triangles_inside_get(const EPhysics_Body *body, Evas_Coo ephysics_world_render_geometry_get(body->world, NULL, &wy, NULL, NULL, &wh, NULL); xx = x / rate; - yy = ((wh + wy) - y) / rate; + yy = (wy + (wh - y)) / rate; zz = z / rate; dd = d / rate; ww = w / rate; @@ -2333,7 +2333,7 @@ ephysics_body_soft_body_triangles_inside_get(const EPhysics_Body *body, Evas_Coo nz = node->m_x.z(); if ((nz > zz || nz < dd) || (nx < xx || nx > xx + ww) || - (ny > yy || ny < ny - hh)) + (ny > yy || ny < yy - hh)) out++; } @@ -2359,7 +2359,7 @@ _ephysics_body_soft_body_triangle_impulse_apply(EPhysics_Body *body, int idx, do btVector3 impulse; rate = ephysics_world_rate_get(body->world); - impulse = btVector3(x / rate, y / rate, z / rate); + impulse = btVector3(x / rate, - y / rate, z / rate); face = body->soft_body->m_faces[idx]; for (int i = 0; i < 3; i++)