Spawn boids in larger ring so they don't pop apart

The separation function causes the boids to rush away from each other
when the simulation starts because they're all stacked at the origin.

Spawn them out in a ringso that this doesn't happen nearly as
aggressively.
This commit is contained in:
2024-07-10 15:03:49 -05:00
parent 806c23c620
commit 1fc79ae7bb

View File

@@ -87,6 +87,10 @@ fn spawn_boids(
MaterialMesh2dBundle { MaterialMesh2dBundle {
mesh: meshes.add(Circle::default()).into(), mesh: meshes.add(Circle::default()).into(),
material: materials.add(Color::srgb(1.0, 1.0, 1.0)), material: materials.add(Color::srgb(1.0, 1.0, 1.0)),
transform: Transform {
translation: vel * 20.0,
..default()
},
..default() ..default()
}, },
)); ));