ephysics: set velocity before applying impulse on

sandbox

Otherwise the velocity implied by impulse will be zeroed.



SVN revision: 78202
This commit is contained in:
Bruno Dilly 2012-10-18 21:23:16 +00:00
parent 64bc76ba49
commit 2db55269f6
1 changed files with 6 additions and 6 deletions

View File

@ -459,12 +459,6 @@ _simulate_body(Body_Data *bd, Evas_Coord x, Evas_Coord y)
{
ephysics_body_stop(bd->body);
ephysics_body_geometry_set(bd->body, x, y, -15, 70, 70, 30);
ephysics_body_impulse_apply(bd->body,
elm_slider_value_get(bd->controls.impulse.x),
elm_slider_value_get(bd->controls.impulse.y), 0,
elm_slider_value_get(bd->controls.impulse.relx),
elm_slider_value_get(bd->controls.impulse.rely),
0);
ephysics_body_linear_velocity_set(bd->body,
elm_slider_value_get(
bd->controls.velocity.x),
@ -473,6 +467,12 @@ _simulate_body(Body_Data *bd, Evas_Coord x, Evas_Coord y)
ephysics_body_angular_velocity_set(bd->body, 0, 0,
elm_slider_value_get(
bd->controls.velocity.angular));
ephysics_body_impulse_apply(bd->body,
elm_slider_value_get(bd->controls.impulse.x),
elm_slider_value_get(bd->controls.impulse.y), 0,
elm_slider_value_get(bd->controls.impulse.relx),
elm_slider_value_get(bd->controls.impulse.rely),
0);
}
static void