From 1ea33d9283262a17e72bf7055a86f826137e10ae Mon Sep 17 00:00:00 2001 From: samuel-cavalcanti Date: Fri, 13 Oct 2023 22:34:21 -0300 Subject: [PATCH] moved steping to first run --- examples/simple_test.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/simple_test.rs b/examples/simple_test.rs index d021037..4809230 100644 --- a/examples/simple_test.rs +++ b/examples/simple_test.rs @@ -53,11 +53,14 @@ fn main() -> Result<(), RemoteAPIError> { client.sim_set_object_position(*h, pos, Some(sim::HANDLE_WORLD))?; } + client.sim_set_stepping(true)?; + client.sim_start_simulation()?; // Run a simulation in asynchronous mode: let mut time = client.sim_get_simulation_time()?; while time < 3.0 { time = client.sim_get_simulation_time()?; + client.sim_step()?; println!("Simulation time: {time:.2} [s] (simulation running asynchronously to client, i.e. non-stepped)", time = time); }