# rigidbody

> Talos next · Since 0.6

Use it in a scene entity's `components` list as `{ "type": "rigidbody", … }`. The contract writes the fields flat and refuses unknown keys.

## Fields

| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| `kind` | `BodyKind` | yes |  | `static`, `dynamic`, `kinematic` |  |
| `mass` | `number` | no |  |  |  |
| `friction` | `number` | no |  |  |  |
| `restitution` | `number` | no |  |  |  |
| `ccd` | `boolean` | no |  |  | Continuous collision detection for this body, overriding the scene's physics quality. true makes it a bullet: whenever it moves fast it is swept against every other body, moving ones included, so a thrown ball or a projectile cannot pass through a thin wall or a crate between two ticks. Two bullets are not swept against each other. false keeps it out of the quality's per-body CCD (fast bodies are still swept against static colliders unless the quality's ccd is off). Absent follows meta.physics (medium: on for bodies moving fast enough to tunnel). Only dynamic bodies use it. |
| `lockAxes` | `LockAxes` | no |  |  | World axes this body may not move along or turn about, e.g. { "rotation": ["x", "z"] } for a crate that only turns about Y. Combines with planar. Only dynamic bodies use it. |
| `planar` | `boolean` | no | `false` |  | true keeps the body in the XY plane at the Z it spawned at: translation locked on Z and rotation locked about X and Y, so it only slides in X and Y and spins about Z (2D physics on the 3D solver). Adds to lockAxes. Default false. Only dynamic bodies use it. |

## Rules that can refuse it

- `buoyancy-without-body`
- `dynamic-needs-collider`
- `joint-invalid`
- `tilemap-invalid`
- `vehicle-needs-dynamic-body`
- `wheel-invalid`

## Example

From the contract's tested fixture `fixtures/contract/full20/scene.json#wall-north`.

```json
{
  "type": "rigidbody",
  "kind": "static"
}
```
