summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Dorileo <dorileo@profusion.mobi>2012-12-03 21:29:21 +0000
committerLeandro Dorileo <dorileo@profusion.mobi>2012-12-03 21:29:21 +0000
commitff57aea85321f9ec6411dcb5228162cf3801b51d (patch)
treed754f9776d9898fb94047e60a1c421ef5a6154dd
parent4a1a773d2710d005141feabecf40f53830e60ed6 (diff)
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
-rw-r--r--legacy/ephysics/src/lib/ephysics_body.cpp6
1 files 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
2315 ephysics_world_render_geometry_get(body->world, NULL, &wy, NULL, NULL, &wh, 2315 ephysics_world_render_geometry_get(body->world, NULL, &wy, NULL, NULL, &wh,
2316 NULL); 2316 NULL);
2317 xx = x / rate; 2317 xx = x / rate;
2318 yy = ((wh + wy) - y) / rate; 2318 yy = (wy + (wh - y)) / rate;
2319 zz = z / rate; 2319 zz = z / rate;
2320 dd = d / rate; 2320 dd = d / rate;
2321 ww = w / rate; 2321 ww = w / rate;
@@ -2333,7 +2333,7 @@ ephysics_body_soft_body_triangles_inside_get(const EPhysics_Body *body, Evas_Coo
2333 nz = node->m_x.z(); 2333 nz = node->m_x.z();
2334 2334
2335 if ((nz > zz || nz < dd) || (nx < xx || nx > xx + ww) || 2335 if ((nz > zz || nz < dd) || (nx < xx || nx > xx + ww) ||
2336 (ny > yy || ny < ny - hh)) 2336 (ny > yy || ny < yy - hh))
2337 out++; 2337 out++;
2338 } 2338 }
2339 2339
@@ -2359,7 +2359,7 @@ _ephysics_body_soft_body_triangle_impulse_apply(EPhysics_Body *body, int idx, do
2359 btVector3 impulse; 2359 btVector3 impulse;
2360 2360
2361 rate = ephysics_world_rate_get(body->world); 2361 rate = ephysics_world_rate_get(body->world);
2362 impulse = btVector3(x / rate, y / rate, z / rate); 2362 impulse = btVector3(x / rate, - y / rate, z / rate);
2363 2363
2364 face = body->soft_body->m_faces[idx]; 2364 face = body->soft_body->m_faces[idx];
2365 for (int i = 0; i < 3; i++) 2365 for (int i = 0; i < 3; i++)