The RigidBodyComponentSystem manages the physics simulation for all rigid body components in the application. It is accessed via app.systems.rigidbody. Its primary responsibilities include owning the physics world, creating/destroying bodies for rigid body and collision components, stepping the simulation once per frame, and updating entity transforms based on simulation results. It also handles global settings like gravity, performs raycasts, and reports collisions.
Requirement: The system is only functional after a physics backend is installed. This can be done by:
- Supplying
physicsWorld in AppOptions during application creation. - Automatically loading the Ammo.js
WasmModule.