5. Physics

The physics subsystem exists independently of the graphics subsystem. There can be physics bodies that have no graphical representation (i.e. invisible), and equally there can be graphics bodies that have no physical representation (e.g. particles / ghosts).

The physics subsystem exposes a physics world in which physics bodies can be created to interact with each other. It is also possible to do spatial queries, like ray casts, sweeps of various shapes and collision volume tests. Callbacks and query results from the physics world are used by Lua scripts to update graphics and perform game logic.

5.1. Physics Bodies

Physics Bodies exist in the physics world. Every game step, their position and orientation are updated based on rigid body dynamics and other physical simulation. Typically, this information is used to update graphics objects but in principle it could be used for anything.

5.2. Collision Files