Fix balls showing up in the wrong place
All checks were successful
CI / Formatting (push) Successful in 1m17s

This commit is contained in:
Michael Bradley 2025-05-23 17:06:05 -04:00
parent d73683359a
commit 10a6bad336
Signed by: MichaelBradley
SSH key fingerprint: SHA256:BKO2eI2LPsCbQS3n3i5SdwZTAIV3F1lHezR07qP+Ob0

View file

@ -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,
), ),
)); ));