From 24b984460ddc247bf2353f3e6f47fd86ea8a53bc Mon Sep 17 00:00:00 2001 From: Amatsugu Date: Sun, 3 Mar 2024 16:27:57 -0500 Subject: [PATCH] Final fixes --- src/boids.rs | 70 ++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/boids.rs b/src/boids.rs index 07ebede..3206c39 100644 --- a/src/boids.rs +++ b/src/boids.rs @@ -11,39 +11,47 @@ impl Plugin for Boids { .add_systems(Update, (simulate_boids, update_boid_vel).chain()); } } +const PROTECTED_RANGE: f32 = 40.; +const AVOID_RANGE: f32 = 20.; +const ALIGN_RANGE: f32 = 300.; +const CO_RANGE: f32 = 200.; + +const ALIGN_FACTOR: f32 = 0.125; +const CO_FACTOR: f32 = 0.05; + +const MAX_RANGE: f32 = 500.; +const MAX_SPEED: f32 = 200.; + +const GRID_SIZE: i32 = 30; fn simulate_boids(time: Res