summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-10-18 21:23:16 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-10-18 21:23:16 +0000
commit2db55269f67727c50f709f65c69686e68103136b (patch)
tree026d76a717022aaa0909051daab541f9ee1843ea /legacy
parent64bc76ba49c73d16425d84317bfd38c1e697e901 (diff)
ephysics: set velocity before applying impulse on
sandbox Otherwise the velocity implied by impulse will be zeroed. SVN revision: 78202
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ephysics/src/bin/ephysics_sandbox.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/legacy/ephysics/src/bin/ephysics_sandbox.c b/legacy/ephysics/src/bin/ephysics_sandbox.c
index 6c1dd5f3cc..ccbbd6bc12 100644
--- a/legacy/ephysics/src/bin/ephysics_sandbox.c
+++ b/legacy/ephysics/src/bin/ephysics_sandbox.c
@@ -459,12 +459,6 @@ _simulate_body(Body_Data *bd, Evas_Coord x, Evas_Coord y)
459{ 459{
460 ephysics_body_stop(bd->body); 460 ephysics_body_stop(bd->body);
461 ephysics_body_geometry_set(bd->body, x, y, -15, 70, 70, 30); 461 ephysics_body_geometry_set(bd->body, x, y, -15, 70, 70, 30);
462 ephysics_body_impulse_apply(bd->body,
463 elm_slider_value_get(bd->controls.impulse.x),
464 elm_slider_value_get(bd->controls.impulse.y), 0,
465 elm_slider_value_get(bd->controls.impulse.relx),
466 elm_slider_value_get(bd->controls.impulse.rely),
467 0);
468 ephysics_body_linear_velocity_set(bd->body, 462 ephysics_body_linear_velocity_set(bd->body,
469 elm_slider_value_get( 463 elm_slider_value_get(
470 bd->controls.velocity.x), 464 bd->controls.velocity.x),
@@ -473,6 +467,12 @@ _simulate_body(Body_Data *bd, Evas_Coord x, Evas_Coord y)
473 ephysics_body_angular_velocity_set(bd->body, 0, 0, 467 ephysics_body_angular_velocity_set(bd->body, 0, 0,
474 elm_slider_value_get( 468 elm_slider_value_get(
475 bd->controls.velocity.angular)); 469 bd->controls.velocity.angular));
470 ephysics_body_impulse_apply(bd->body,
471 elm_slider_value_get(bd->controls.impulse.x),
472 elm_slider_value_get(bd->controls.impulse.y), 0,
473 elm_slider_value_get(bd->controls.impulse.relx),
474 elm_slider_value_get(bd->controls.impulse.rely),
475 0);
476} 476}
477 477
478static void 478static void