diff --git a/src/birdoids_plugin.rs b/src/birdoids_plugin.rs index 242e24fd..3fa129e0 100644 --- a/src/birdoids_plugin.rs +++ b/src/birdoids_plugin.rs @@ -52,7 +52,7 @@ struct PlayerBoid; pub(crate) struct Velocity(Vec3); #[derive(Component, Deref, DerefMut)] -pub(crate) struct Acceleration(Vec3); +pub(crate) struct Force(Vec3); #[derive(Component)] pub(crate) struct TrackedByKdTree; @@ -61,7 +61,7 @@ pub(crate) struct TrackedByKdTree; struct BoidBundle { boid: Boid, velocity: Velocity, - accel: Acceleration, + accel: Force, spatial: TrackedByKdTree, } @@ -70,7 +70,7 @@ impl BoidBundle { Self { boid: Boid, velocity: Velocity(vel), - accel: Acceleration(Vec3::ZERO), + accel: Force(Vec3::ZERO), spatial: TrackedByKdTree, } } @@ -114,7 +114,7 @@ fn spawn_boids( )); } -fn space_brakes(mut mobs: Query<&mut Acceleration, With>) { +fn space_brakes(mut mobs: Query<&mut Force, With>) { for mut accel in &mut mobs { let braking_dir = -accel.0 * SPACEBRAKES_COEFFICIENT; accel.0 += braking_dir; @@ -147,7 +147,7 @@ fn turn_if_edge( } fn apply_velocity( - mut query: Query<(&mut Transform, &Velocity, &mut Acceleration)>, + mut query: Query<(&mut Transform, &Velocity, &mut Force)>, time: Res