- Made to be very simple to use
- Comes with some primitives but also supports loading OBJ files
- Dynamic objects / static objects supported (collision detection uses GJK)
Code to generate the explosion
- Create a class that inherits from Engine
- Create a constructor that takes in a Size and string
- Override the Awake and Update methods
- In Program.cs or wherever your Main method is, create a variable of type Engine and set it equal to the new class you've created
- Call .Run() on the variable
Awake is run first as soon as the program begins, and Update is run every frame after that.
GameObjects are added by using the Instantiate method, parameters being the GameObject to add and the ID of the GameObject. IDs are provided as a way to keep track of each GameObject and have the ability to change/delete individual objects after creation. To delete an object simply call the Delete method and pass in the ID of the object as the only parameter.
The GameObject class contains information about the Position and Rotation (both stored in Transform), Mass, Force, Velocity, Color, Mesh, and whether or not the GameObject is Dynamic.
The Step method is used to calculate the physics on individual GameObjects, and is virtual so it can be overrode to provide custom physics to each object.