From 20ef564c699e108c4fd24af1c1343f5896f9c79a Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 6 Oct 2024 00:37:57 +0200 Subject: [PATCH] Use FixedUpdate schedule instead of Update --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index c4240e8..0c4e887 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ const MIN_POSITION: Vec2 = Vec2::ZERO; const MAX_POSITION: Vec2 = Vec2::new(500., 500.); const ANT_COUNT: u32 = 25; -const ANT_SPEED: f32 = 0.25; +const ANT_SPEED: f32 = 0.5; const RANDOM_WALK_CONE: f32 = PI / 180. * 20.; /// The app's entrypoint. @@ -32,7 +32,7 @@ fn main() { // Update systems are ran each update cycle, i.e. each frame. app.add_systems( - Update, + FixedUpdate, ( randomized_velocity_system, wall_avoidance_system,