From 1fc79ae7bb196e99397c36cb76dc5ff4aeae8dee Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Wed, 10 Jul 2024 15:03:49 -0500 Subject: [PATCH] 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. --- src/birdoids_plugin.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/birdoids_plugin.rs b/src/birdoids_plugin.rs index a19593fa..2c8c3c56 100644 --- a/src/birdoids_plugin.rs +++ b/src/birdoids_plugin.rs @@ -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() }, ));