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:
@@ -87,6 +87,10 @@ fn spawn_boids(
|
||||
MaterialMesh2dBundle {
|
||||
mesh: meshes.add(Circle::default()).into(),
|
||||
material: materials.add(Color::srgb(1.0, 1.0, 1.0)),
|
||||
transform: Transform {
|
||||
translation: vel * 20.0,
|
||||
..default()
|
||||
},
|
||||
..default()
|
||||
},
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user