comments
parent
b7a5277a11
commit
5bba4f019e
|
@ -33,8 +33,9 @@ fn random_vec(_app: &App) -> nalgebra::Vector2<f32> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fill_particles(app: &App, colliders: &mut ColliderSet, bodies: &mut RigidBodySet) {
|
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<nalgebra::Vector2<f32>> = Vec::new();
|
let mut positions: Vec<nalgebra::Vector2<f32>> = Vec::new();
|
||||||
|
|
||||||
for _ in 0..PARTICLE_COUNT {
|
for _ in 0..PARTICLE_COUNT {
|
||||||
let mut xy = random_vec(app);
|
let mut xy = random_vec(app);
|
||||||
while !positions
|
while !positions
|
||||||
|
|
Loading…
Reference in New Issue