summaryrefslogtreecommitdiff
path: root/legacy/ephysics/src/bin/ephysics_sandbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/ephysics/src/bin/ephysics_sandbox.c')
-rw-r--r--legacy/ephysics/src/bin/ephysics_sandbox.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/legacy/ephysics/src/bin/ephysics_sandbox.c b/legacy/ephysics/src/bin/ephysics_sandbox.c
index ccbbd6bc12..e0da0f37b5 100644
--- a/legacy/ephysics/src/bin/ephysics_sandbox.c
+++ b/legacy/ephysics/src/bin/ephysics_sandbox.c
@@ -209,8 +209,10 @@ static void
209_mass_set_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) 209_mass_set_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
210{ 210{
211 Body_Data *bd = data; 211 Body_Data *bd = data;
212 ephysics_body_mass_set(bd->body, elm_slider_value_get(obj)); 212 double mass = elm_slider_value_get(obj);
213 elm_slider_value_set(evas_object_data_get(obj, "density"), 0); 213 ephysics_body_mass_set(bd->body, mass);
214 elm_slider_value_set(evas_object_data_get(obj, "density"),
215 mass / ephysics_body_volume_get(bd->body));
214} 216}
215 217
216static void 218static void