Documentation
Physics
3D PhysX integration and built-in 2D physics simulation.
3D Physics (PhysX)
PhysX integration is optional and controlled by MODULARITY_ENABLE_PHYSX. The system:
- Creates rigid bodies/colliders on play start.
- Steps simulation during play/spec modes.
- Supports raycasts and force/impulse APIs.
Rigidbody Component
Properties:
- Mass - Object mass in kg
- Damping - Linear and angular damping
- Gravity - Whether gravity applies
- Kinematic - Non-physics controlled movement
- Lock Rotation - Prevent rotation on axes
Collider Component
Supported collider types:
- Box - Axis-aligned box collider
- Mesh - Arbitrary mesh collider
- Convex Mesh - Convex hull collider
- Capsule - Capsule collider
2D Physics
The engine includes a simple 2D simulation for UI and 2D elements:
Rigidbody2D
- Velocity-based movement
- Gravity simulation
- Damping controls
Collider2D
Supported 2D collider types:
- Box - 2D box collider
- Polygon - Arbitrary polygon collider
- Edge - Line segment collider
Helper Components
ParallaxLayer2D- Parallax scrolling effectCameraFollow2D- Camera following behavior