From f083a40682898f9820e50a20c94e91f78f48c929 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Wed, 29 Jan 2020 04:01:03 +0400 Subject: [PATCH] Add random slow rotation to asteroids. --- core/src/com/me/asteroids/systems/AsteroidSpawningSystem.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/com/me/asteroids/systems/AsteroidSpawningSystem.java b/core/src/com/me/asteroids/systems/AsteroidSpawningSystem.java index 98f0ba1..94a5e9b 100644 --- a/core/src/com/me/asteroids/systems/AsteroidSpawningSystem.java +++ b/core/src/com/me/asteroids/systems/AsteroidSpawningSystem.java @@ -65,6 +65,7 @@ public class AsteroidSpawningSystem extends BaseSystem { VelocityComponent velocityComponent = velocityMapper.get(asteroid); velocityComponent.velocity = new Vector2().setToRandomDirection().scl(rand.nextFloat(125, 175)); + velocityComponent.angularVelocity = rand.nextFloat(-30, 30); asteroid.activate(); }