1

Use FixedUpdate schedule instead of Update

This commit is contained in:
2024-10-06 00:37:57 +02:00
parent 9370462fe1
commit 20ef564c69

View File

@ -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,