Add random slow rotation to asteroids.
This commit is contained in:
parent
3ffb274e8d
commit
f083a40682
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user