seperation was actually cohesion the whole time

main
Zynh Ludwig 2024-09-03 20:40:47 -07:00
parent b0a1676fd2
commit 4317ccf3a3
1 changed files with 7 additions and 7 deletions

View File

@ -86,12 +86,6 @@ fn build_local_cache(
fn cohesion(
mut boids: Query<(&Transform, &LocalCache, &mut CohesionAcceleration), With<Boid>>,
other_boids: Query<&Transform, With<Boid>>,
) {
}
fn seperation(
mut boids: Query<(&Transform, &LocalCache, &mut SeperationAcceleration), With<Boid>>,
other_boids: Query<&Transform, With<Boid>>,
) {
boids
.par_iter_mut()
@ -106,10 +100,16 @@ fn seperation(
}
accel.0 /= count as f32;
accel.0 = transform.translation.xy() - accel.0;
accel.0 -= transform.translation.xy();
})
}
fn seperation(
mut boids: Query<(&Transform, &LocalCache, &mut SeperationAcceleration), With<Boid>>,
other_boids: Query<&Transform, With<Boid>>,
) {
}
fn alignment(
mut boids: Query<(&Velocity, &LocalCache, &mut AlignmentAcceleration), With<Boid>>,
other_boids: Query<&Velocity, With<Boid>>,