Add random slow rotation to asteroids.

This commit is contained in:
Matt Low 2020-01-29 04:01:03 +04:00
parent 3ffb274e8d
commit f083a40682

View File

@ -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();
}