Fix balls showing up in the wrong place
All checks were successful
CI / Formatting (push) Successful in 1m17s
All checks were successful
CI / Formatting (push) Successful in 1m17s
This commit is contained in:
parent
d73683359a
commit
10a6bad336
1 changed files with 4 additions and 2 deletions
|
@ -75,8 +75,10 @@ pub fn setup_balls(
|
||||||
Mesh2d(meshes.add(circle)),
|
Mesh2d(meshes.add(circle)),
|
||||||
MeshMaterial2d(materials.add(Color::from(RED_400))),
|
MeshMaterial2d(materials.add(Color::from(RED_400))),
|
||||||
Transform::from_xyz(
|
Transform::from_xyz(
|
||||||
random.random::<f32>() * (region.0 - 2.0 * circle.radius) + circle.radius,
|
random.random::<f32>() * (region.0 - 2.0 * circle.radius) + circle.radius
|
||||||
random.random::<f32>() * (region.1 - 2.0 * circle.radius) + circle.radius,
|
- region.0 / 2.0,
|
||||||
|
random.random::<f32>() * (region.1 - 2.0 * circle.radius) + circle.radius
|
||||||
|
- region.1 / 2.0,
|
||||||
0.0,
|
0.0,
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue