forked from enlightenment/efl
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:
parent
64bc76ba49
commit
2db55269f6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue