From 3d28d489b06e58f6134d872891560b51c07b3bd3 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Sun, 10 Aug 2025 18:46:49 -0500 Subject: [PATCH] Fix: Pass size through to spawned asteroid I actually have most of the asteroid's destruction handling system done and found this bug. Asteroid *assets* are selected based on the size set in the spawn event, but the `Asteroid` Component itself was left hard-coded to the smallest size. --- src/asteroids.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asteroids.rs b/src/asteroids.rs index 81793e5..b2f5945 100644 --- a/src/asteroids.rs +++ b/src/asteroids.rs @@ -117,7 +117,7 @@ pub fn spawn_asteroid( }; commands.spawn(( - Asteroid(AsteroidSize::Small), + Asteroid(spawn.size), Collider::ball(collider_radius), Sensor, Transform::from_translation(spawn.pos.extend(0.0)),