Colliders are the physical shapes that the Jitter2 simulation uses to detect contact between objects. EveryDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl/llms.txt
Use this file to discover all available pages before exploring further.
Rigidbody3D gathers all Collider components on itself and its children to build a composite body — you never need to call shape-creation APIs manually. Prowl ships eight collider types covering everything from simple primitives to arbitrary triangle-mesh geometry, plus an experimental WheelCollider for vehicle simulations. Choosing the right collider type for each object keeps your physics simulation fast and predictable.
How Colliders Work with Rigidbody3D
ACollider on its own has no effect. It must live on the same GameObject as a Rigidbody3D, or anywhere in the GameObject’s child hierarchy. When the Rigidbody3D is enabled — or when any collider is added, removed, or changed at runtime — Rigidbody3D.UpdateShapes() regenerates the entire body shape automatically.
Multiple colliders on a single
Rigidbody3D are composed into a compound body. Each collider’s center and rotation offsets are applied in the rigid body’s local space, making compound shapes easy to build without additional code.Collider class exposes two shared offset fields:
| Field | Type | Description |
|---|---|---|
center | Vector3 | Local-space positional offset of the shape relative to the parent rigid body. |
rotation | Vector3 | Euler-angle rotation offset applied to the shape in local space. |
center or rotation triggers OnValidate → Rigidbody3D.OnValidate(), instantly refreshing the physics body in the editor and at runtime.
Primitive Colliders
Primitive colliders map directly to Jitter2’s analytic shapes and are the cheapest option for collision detection. Always prefer a primitive over a mesh collider when your geometry is close enough to one of these forms.BoxCollider
A solid axis-aligned box. Set the
Size vector to match the dimensions of your mesh in metres.SphereCollider
A perfect sphere. Ideal for balls, grenades, and rounded objects. Set
Radius in metres.CapsuleCollider
A cylinder with hemispherical end-caps. The standard shape for humanoid characters. Controlled by
Radius and Height.CylinderCollider
A flat-capped cylinder. Useful for wheels, columns, and cans. Controlled by
Radius and Height.ConeCollider
A cone shape with a single apex. Controlled by
Radius and Height.BoxCollider
SphereCollider
CapsuleCollider
CylinderCollider
ConeCollider
Mesh-Based Colliders
Use mesh colliders when your geometry cannot be approximated by a primitive. There are two variants with different performance and accuracy trade-offs.- ConvexHullCollider
- MeshCollider
Builds a convex hull from all vertices in the referenced If
Mesh using Jitter2’s ConvexHullShape. This is a single shape, so it is fast and can be used on dynamic (non-static) bodies. It cannot represent concave geometry.Mesh is not assigned the component will fall back to reading the Mesh from a sibling MeshRenderer component on Awake.WheelCollider (Experimental)
WheelCollider is a specialised component that simulates a raycast-based vehicle wheel with suspension, side-slip friction, and drive torque. It does not extend Collider — it is a standalone MonoBehaviour that must be placed on a child GameObject of the vehicle’s Rigidbody3D.
WheelCollider is marked experimental. The forward-friction code path is partially commented out in the source while the model is being refined.WheelCollider properties:
| Property | Default | Description |
|---|---|---|
Radius | 0.5 | Wheel radius in metres. |
SuspensionTravel | 0.2 | Maximum vertical suspension travel (metres). |
Spring | 35000 | Suspension spring stiffness (N/m). |
Damping | 1500 | Suspension damping coefficient (N·s/m). |
Inertia | 5 | Rotational inertia of the wheel (kg·m²). |
SideFriction | 3.2 | Lateral friction multiplier. |
SteerAngle | 0 | Yaw offset applied when casting contact rays (degrees). |
IsLocked | false | When true, the wheel is braked — angular velocity is zeroed. |
IsGrounded | (read-only) | true when at least one ray hit the ground last step. |
WheelRotation | (read-only) | Accumulated wheel rotation angle (radians). |
Compound Colliders
Attach multiple collider components to a singleRigidbody3D (on the same or child GameObjects) to model complex shapes. The rigid body iterates all Collider components via GetComponents<Collider>() and composites their shapes using TransformedShape to preserve each collider’s offset and rotation.
Setting Up a Character
Add Rigidbody3D
Add Component → Physics → Rigidbody3D. Set
Mass to 80 and leave AffectedByGravity enabled.Add CapsuleCollider
Add Component → Physics → Capsule Collider. Set
Radius to 0.35 and Height to 1.75. Offset center to (0, 0.875, 0) so the bottom of the capsule sits at the object’s origin.Tune material
Set
Friction to 0.4 and Restitution to 0 on the Rigidbody3D so the character slides smoothly without bouncing.