From 271c4ae18dd447c7b0b9affaf5fe347587cf3992 Mon Sep 17 00:00:00 2001 From: Amatsugu Date: Fri, 1 Mar 2024 22:12:28 -0500 Subject: [PATCH] Fixes to movements. Flocking is still broken --- src/boids.rs | 69 +++++++++++++++++++++------------------------------- 1 file changed, 28 insertions(+), 41 deletions(-) diff --git a/src/boids.rs b/src/boids.rs index abef83d..34c1b8a 100644 --- a/src/boids.rs +++ b/src/boids.rs @@ -1,7 +1,6 @@ use bevy::{ prelude::*, sprite::{MaterialMesh2dBundle, Mesh2dHandle}, - window::PrimaryWindow, }; pub struct Boids; @@ -9,7 +8,7 @@ impl Plugin for Boids { fn build(&self, app: &mut App) { app.insert_resource(ClearColor(Color::rgb(0.09, 0., 0.0390625))) .add_systems(Startup, init) - .add_systems(Update, (update_boid_vel, wrap_boids, simulate_boids)); + .add_systems(Update, (simulate_boids, update_boid_vel).chain()); } } @@ -19,20 +18,23 @@ fn simulate_boids(time: Res