Asteroid Spawner
This document describes using the asteroid spawner, to produce an optimized, and efficient seemingly infinite asteroid field that surrounds the player at all times.
- 1 Usage
Usage
This describes how to use the spawner.
AsteroidSpawner
c++ class.asteroid_spawner_bp
derived blueprint.Drag and place in scene. only one is required.
Meant for infinite, open space, not landscape.
The asteroid spawner properties
The asteroid spawner uses the current planetary ring type, or planet type as set in the game instance, to determine which materials to apply on the asteroids, this can be used to simulate ice rings.
After adding the spawner to the scene, it will not be selectable, as it can cause performance issues if selecting while testing in editor, due to the volume of instances, to enable selecting, set the ‘debug
' property to true using the blueprint editor, then the actor will become selectable in the outliner.
The asteroid spawner will also rotate certain asteroids, by spawning AsteroidRotator
actors to rotate a percentage of all asteroids at a per instance random but constant speeds by taking their indices into account.
Demo:
Ice Ring: