From 7b8e322446ffa36e3f47078e23eb61ef423175dc Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 21 Sep 2020 10:43:20 +0200 Subject: Make kinematic bodies properly wake up dynamic bodies. --- examples3d/platform3.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples3d') diff --git a/examples3d/platform3.rs b/examples3d/platform3.rs index bb71b76..6c3483e 100644 --- a/examples3d/platform3.rs +++ b/examples3d/platform3.rs @@ -64,7 +64,13 @@ pub fn init_world(testbed: &mut Testbed) { /* * Setup a callback to control the platform. */ + let mut count = 0; testbed.add_callback(move |_, physics, _, _, time| { + count += 1; + if count % 100 > 50 { + return; + } + if let Some(mut platform) = physics.bodies.get_mut(platform_handle) { let mut next_pos = platform.position; -- cgit