Official continuation of Destination Sol, the great fun little arcade space shooter from http://sourceforge.net/projects/destinationsol/ Modules live at https://github.com/DestinationSol/
This PR generifies collision mesh creation. Rather than needing to create a separate system for each type of Body with a new instance of CollisionMeshLoader, the new CollisionMeshBuilderSystem handles all Body creation.
The BodyLinked component has two new fields - one for the JSON path to the mesh data, and another for the schema file that details how the data is laid out. When an entity has a BodyLinked component, the system will build a Body using the mesh data when it receives a GenerateBodyEvent (which will happen at the next tick).
Testing
Shoot the testing asteroid (the golden asteroid visible on startup). The projectile should still collide with it, so the asteroid should be destroyed. Then try flying into the rubble. The ship should not pass through the rubble.
Description
This PR generifies collision mesh creation. Rather than needing to create a separate system for each type of
Body
with a new instance ofCollisionMeshLoader
, the newCollisionMeshBuilderSystem
handles allBody
creation.The
BodyLinked
component has two new fields - one for the JSON path to the mesh data, and another for the schema file that details how the data is laid out. When an entity has aBodyLinked
component, the system will build aBody
using the mesh data when it receives aGenerateBodyEvent
(which will happen at the next tick).Testing
Shoot the testing asteroid (the golden asteroid visible on startup). The projectile should still collide with it, so the asteroid should be destroyed. Then try flying into the rubble. The ship should not pass through the rubble.