diff --git a/src/main.rs b/src/main.rs index 953454e..78575de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,8 +33,9 @@ fn random_vec(_app: &App) -> nalgebra::Vector2 { } fn fill_particles(app: &App, colliders: &mut ColliderSet, bodies: &mut RigidBodySet) { + // Keeping track of already placed balls to avoid overlap + // Need to look into a way to do this with rapier directly let mut positions: Vec> = Vec::new(); - for _ in 0..PARTICLE_COUNT { let mut xy = random_vec(app); while !positions