# CrashCar
The crush of a crashCars car. `Cars.spawn` puts it on the chassis entity, which must carry a dynamic
`Physics` body; it needs the car's `SoftBody` shell entity (field `shell`) and the bumper / bonnet
children the spawn creates. It is not meant to be added by hand.
On the peer that simulates the car it runs the lane model every physics step: three lanes per face
(front, rear, left, right) cast rays from inside the body, push the car (and a dynamic or soft
obstacle) with that lane's share of `Cars.crushForce` for its crush depth, never more than stops the
closing speed, give back `reboundShare` of the impact speed, and grow the lane's depth as the
obstacle moves in. It writes the lane depths into the shell's crush zones (positions and rest shape,
so the dent stays and replicates), slides the bumper back and folds the bonnet up, and tears them
off as loose synced bodies past `bumperOffAt` / `bonnetOffAt`. `energyJ` is the work the crush
forces did on the closing motion.
Methods: `:measureCrush(face)`, `:worstFace()`, `:track(on, face)`, `:settle(face)`,
`:setExclude(ids)`, `:brake(torque)`, `:repair()`. Synced fields include `crushMax`,
`crushResidual`, `lanes`, `energyJ`, `peakForceN`, `detached`, `looseBumper`, `looseBonnet`, `ready`.
Events: `onPartDetached { part }`, `onImpact { face, speed, target }`.
# recorder
Records what this peer draws of a hierarchy and plays it back as local ghosts, at any speed. It exists
because the engine has no record and playback of the simulation (#20544). The `CrashRig` component uses it
for the slow-motion replay; any game can use it for kill-cams or instant replays.
- `Rec.new{ roots, track, hz = 60, maxSeconds = 8, ghostLayer = "default" }` creates a recorder.
- `roots` are entity ids whose whole hierarchy is recorded: every entity with a `Model`, plus the
particles of every `SoftBody` under them.
- `track` adds entities to record even without a `Model`, such as a camera target.
- `rec:start()`, `rec:stop()`, `rec:duration()` and `rec:frames()` control and report the recording.
Recording rescans its roots every 0.1 s, so pieces that appear later, like a panel coming off, are caught.
- `rec:addRoot(id)` and `rec:addTrack(id)` add to a recording that is already running.
- `rec:trim(t0, t1)` keeps only that window, in seconds since the start.
- `rec:play{ speed = 0.25, loop, onFrame, onDone }` plays it back and returns `{ stop(), time(), playing(), ghostOf(id) }`.
- It spawns local, temporary ghosts: a `Model` for each rigid piece, and a non-colliding soft body for each
soft body, whose particles are written every frame, so dents replay as they formed.
- `ghostOf(id)` gives the ghost standing in for a live entity, to aim cameras at.
Nothing crosses the wire: each peer replays what it drew. Hide the live entities from the replay camera
with a render layer. The rig puts them on `crash`, so its replay camera draws `"all !crash"`.
# obstacles
The crashObstacles API: `require("crashObstacles.obstacles")`. `spawn({ kind, position, synced, vehicle })`
builds one of eleven crash-test obstacles (wall, offset, smallOverlap, bollard, pole, tree, guardrail,
cushion, parkedCar, sidePole, rear) with its impact face at `position` pointing +Z, and returns a handle
with the obstacle's `spec` (mode frontal / side / rear, real-world test, crushable), the car's lateral
`alignX` for the overlap and, for rear tests, the `mover` trolley the rig launches. Also `despawn`,
`catalog`, `kinds`, `spec`, `alignX`, `dent` (permanent dent in metres) and `repair`. Called by a crash
rig or any game that needs something to crash into; see the package README for the full contract.
# cars
The crashCars public API, required as `require("crashCars.cars")`. It reads the catalog
(`catalog`, `looks`, `spec`, `derive`), exposes the structure model every car crushes by
(`structure(m)`, `crushForce(m, S, x, face)`), and `spawn`s a whole car: a dynamic chassis with four
`WheelCollider`s, cabin colliders (floor pan, seat cushions and backs, dash, steering wheel, toe
board, firewall, rear bulkhead, door rings), seat H-point and belt-anchor children, a car-shaped
custom `SoftBody` shell held to the cabin, a bumper and a bonnet, and the `CrashCar` component that
runs the crush. Also `whenReady`, `fromChassis`, `despawn`, `setVelocity` (tow or launch the chassis
and shell together), the frame helpers `worldToLocal` / `localToWorld` / `localDir`, and the
collision bits in `GROUPS` (shell = bit 20, dummy = bit 21).
Called by games and rigs (crashRig, crashObstacles' `parkedCar`, the package example). Spawn on ONE
peer; everything it creates is synced unless `synced = false`. See the package README for the full
reference and measured numbers.
# dummies
The crash test dummy API of the `crashDummies` package: `require("crashDummies.dummies")`.
Builds ragdoll crash test dummies out of rigid bodies (capsules, boxes, spheres) joined by hinge and
generic joints with anatomical limits and capped spring-damper "muscle tone", seats them at a
vehicle's `seat_<x>` H-point frame, belts them to the vehicle's `belt_<seat>_*` anchors with
compliant one-sided webbing (slack, retractor spool-out, pyro pretensioner, load limiter), and draws
the webbing on every peer.
- `spawn(opts) -> handle` — `{ kind, look, belt, vehicle, seat = "seat_driver", synced = true, tone = 0.5, handsInLap? }`
- `despawn(handle)`, `setTone(handle, 0..1)`
- `instrument(handle) -> { read, reset, peak, trace, belt, stop }` — motion probes on head / chest / pelvis
- `catalog()`, `looks()`, `belts()` — the variants with their masses and settings
- `COLLISION_GROUP` — the membership bit (21) every dummy collider carries
Called by game code and by the package's `CrashDummy` component (which runs the belts each physics
step on the simulating peer). See the package README for the full contract and measured numbers.
# crashRig.launch
The rig's three launch modes (`tow`, `drive`, `ramp`) and the ramp launch's geometry, in one place.
`CrashRig` uses `Launch.ramp(speedKmh)` and `Launch.rampPose(...)` to build the ramp and to set the
tow's release speed; the rig gallery draws the same ramp; the test suite checks the angle stays within
2 to 12 degrees and that a faster test gets a flatter ramp.
- `Launch.MODES`: `{ id, name, detail }` for each mode, for a menu.
- `Launch.ramp(speedKmh)`: `{ theta, length, h, lip, land, vLip, vRelease }`, angle in radians, lip
height `h` (m), the speed to leave the lip at and the speed the tow lets go at (m/s).
- `Launch.rampPose(g, x, y, faceZ, width)`: the unit cube's position, rotation and scale for a barrier
face at `faceZ` with the car running toward -Z.
# measure
Crash-test signal processing as pure functions, with no engine state. The `CrashRig` component calls it to
turn probe samples into readouts, and any game that measures accelerations can call it the same way.
- `channel()` collects `{t, g}` samples, keeping time strictly increasing.
- `resample(ch, dt)` puts a channel on a uniform grid (the rig uses 1 kHz).
- `cfc(x, dt, class)` is the SAE J211/1 channel-class filter: a two-pole Butterworth low-pass run forward and
backward (zero phase). Head channels use CFC 1000, chest CFC 180, the car pulse CFC 60.
- `peak(x)` returns the largest value.
- `hic(a, dt, window)` is the Head Injury Criterion; `window = 0.015` gives HIC15.
- `clip3ms(a, dt)` is the highest level the signal holds for a cumulative 3 ms.
- `decimate(x, dt, n)` shrinks a trace to at most `n` points, keeping peaks, for a synced result.
- `rate(result)` gives Euro NCAP-style bands (good / acceptable / marginal / poor) for head, chest and
structure, plus 0–5 stars:
- head: HIC15 500 / 700 / 1000, or the 3 ms clip at 72 / 80 / 88 g, whichever is worse;
- chest: 3 ms clip at 38 / 48 / 60 g;
- structure: crush as a share of the crush zone's travel, 0.70 / 0.85 / 0.97.
```lua
local M = require("crashRig.measure")
local ch = M.channel()
for _, s in Physics.motionSamples(headId, "head") do ch:add(s.time, s.g) end
local u = M.resample(ch, 1 / 1000)
local f = M.cfc(u.g, u.dt, 1000)
print(M.peak(f), M.hic(f, u.dt, 0.015), M.clip3ms(f, u.dt))
```
# crashCars
Crash-test cars whose bodies crumple and stay crumpled. There are nine cars (city car, hatchback,
family saloon, estate, SUV, pickup, sports coupe, people carrier and a 1960s steel saloon), each in
three looks (realistic, toy, low-poly). A car is a real `WheelCollider` chassis. Its cabin has
seats, a dash, a steering wheel, a toe board, a firewall and door rings that a crash dummy can sit
in and hit. The body is a car-shaped soft-body shell whose crush zones keep their dent. The bumper
and bonnet slide and fold with the crush, then tear off as loose bodies. Every piece is synced, so
every player sees the same car, the same dent and the same panels flying.
The crash load follows a per-face **lane model** of the car's structure, with a force law tuned per
model. Into a rigid wall a hatchback crushes about 0.2 m at 30 km/h, 0.65–0.75 m at 50 km/h and
1.1–1.25 m at 70 km/h. The energy its structure absorbs (`energyJ`) comes out at the car's ½mv².
## Install
Install the package `crashCars` from ZeroMind. It lands at `/source/parts/crashCars.package`, or
wherever you install it. Require it by its bare name:
```luau
local Cars = require("crashCars.cars")
```
It depends on nothing but the engine.
## First example
Paste this where only one peer runs it, during play: an `execute` call, a host-only scene
`onHostLoad`, or behind `multiplayer.isHost()`. It lays down a floor and a static wall whose face
is the plane z = 0, spawns a hatchback 12 m up the lane and tows it at 50 km/h. It lets go 1 m
before the wall, then brakes and prints what the crash did.
```luau
--!strict
local Cars = require("crashCars.cars")
local cube = asset.resolve("cube", "mesh")
local floor = entity.spawnSynced("TestFloor", { position = { 0, -1, 0 } })
floor.localScale = { 12, 2, 40 } -- top surface at y = 0
floor.component.add("Model", { model = cube })
floor.component.add("BoxCollider", { friction = 0.8 })
-- a rigid wall: no Physics body, so it is static; its face is the plane z = 0, facing +Z
local wall = entity.spawnSynced("TestWall", { position = { 0, 1, -1 } })
wall.localScale = { 4, 2, 2 }
wall.component.add("Model", { model = cube })
wall.component.add("BoxCollider", {})
-- the car faces -Z (forward) and comes from +Z
local car = Cars.spawn({ model = "hatch", look = "realistic", position = { 0, 0, 14 }, yaw = 0 })
assert(Cars.whenReady(car, 5), "car shell did not build")
car.component:track(true, "front")
local v = 50 / 3.6
local towing = true
local stop = Physics.onBeforeStep(function()
if not towing then
return
end
local bumperZ = car.chassis.position.z - car.frontOffset
if bumperZ <= 1 then -- let go 1 m before the wall
towing = false
return
end
Cars.setVelocity(car, 0, 0, -v) -- tows chassis and shell together
end)
task.wait(2)
stop()
car.component:brake(6000)
local c = car.component:settle("front")
print(("crush %.2f m max / %.2f m mean, peak %.0f g, structure absorbed %.1f kJ, off: %s"):format(
c.max, c.mean, car.component.peakForceN / (car.spec.mass * 9.81), car.component.energyJ / 1000,
table.concat(car.component.detached, ", ")))
```
It passes the strict checker and runs. A hatchback at 50 km/h crushes 0.55–0.75 m at 24–28 g peak, and
`bumper, bonnet` come off. Its structure absorbs about 115 kJ of the 120.6 kJ ½mv² by the moment it stops. Read the open issues under Known limits before you trust
the numbers *after* the stop.
`examples/carsDemo.scene` is the same test as a scene: a hall floor, a concrete wall, a camera and the
`CarsDemo` component (`examples/CarsDemo.component`). The component runs one real car on the host only
and prints the result. Beside the lane, `examples/carsDemoLineup.module` stands one car of every
model as a still picture: meshes only, no physics. Use it for a showroom or menu instead of nine
simulated cars.
## Gallery
`examples/carsGallery.scene` is a showroom of the whole catalog: every model in every look, a 9 × 3
grid of 27 cars (models in catalog order left to right; realistic, toy and low-poly rows front to
back). Each car stands on a plinth with a name placard in world-space text (`Text3D`), such as
"Family saloon · Toy", and each row has its look as a header. It is visual only, built with
`carsDemoLineup`: no physics, no soft bodies, no `CrashCar`. Its camera (`galleryCamera`) frames the
whole grid.
Open it from the Scenes list in the editor, or in Luau with `layers.load("crashCars.examples.carsGallery")`
(a root load replaces the open scene; pass `{ additive = true, origin = { x, y, z } }` to set it
beside your own scene instead). Its `build.luau` lays the grid out from `Cars.catalog()` and
`Cars.looks()`, so a new model or look shows up on the next build.
The package's regression suite is `crashCars.testSuite`: run it in edit mode with `zero tests run crashCars`.
## API
```luau
Cars.spawn(opts) -> Car
```
| option | meaning |
|---|---|
| `model` | catalog id (below). Default `"hatch"` |
| `look` | `"realistic"` (default), `"toy"`, `"lowpoly"` |
| `position` | `{x, y, z}` or `{x=, y=, z=}`: on the ground under the middle of the car |
| `yaw` | radians about +Y. 0 = the car faces **−Z** |
| `synced` | `true` (default): every piece is spawned with `entity.spawnSynced`, so call it on ONE peer. `false` for a local-only car |
| `name` | chassis entity name (default `CrashCar_<model>`); the shell is `<name>_shell` |
`Car` handle (also rebuilt on any peer with `Cars.fromChassis(chassisId)`):
- `id`, `chassis`: the chassis entity id and entity (dynamic `Physics`, four `WheelCollider`s, the
cabin colliders, the `CrashCar` component).
- `shell`: the soft body shell's entity id (a separate root entity held to the cabin).
- `parts = { bumper, bonnet }`: the panels' entity ids while they are attached (children of the
chassis). Once they come off, `component.looseBumper` / `looseBonnet` hold the loose bodies.
- `spec = { id, name, class, mass, length, width, height, wheelbase, frontOverhang, crushable }`,
`derive` (car-local stations, see `specs`), `structure` (see `Cars.structure`), `model`, `look`.
- `component`: the chassis' `CrashCar` component. `wheels`: the four wheel entity ids.
- `frontOffset` / `rearOffset`: metres from the chassis origin to the front face (bumper) along
forward, and to the rear face along back. The bumper's world position along the lane is
`chassis.position.z - frontOffset` for a car facing −Z.
Children of the chassis that a dummy or a rig uses, named exactly:
- `seat_driver`, `seat_passenger`, `seat_rear_left`, `seat_rear_right`: H-points (the hip joint
centre of a seated occupant), facing forward. The rear seats are absent on the pickup.
- `belt_seat_<seat>_lapOuter`, `_lapInner`, `_shoulder`, `_buckle`: belt anchor points.
- `steering_wheel`: centre of the rim (its collider is `col_steering_wheel`).
Everything else in `Cars`:
| call | what it does |
|---|---|
| `Cars.catalog()` | `{ {id, name, class, mass, length, width, height, wheelbase} }` |
| `Cars.looks()` | `{ {id, name, description} }` |
| `Cars.spec(id)` | the raw spec table from `specs` (nil for an unknown id) |
| `Cars.derive(id)` | car-local stations: axles, windscreen, firewall, roof end, H-points, steering wheel centre |
| `Cars.structure(m)` | the structure of a spec `m`: `frontG`/`rearG`/`sideG` = `{g at 0 crush, g at 85 % travel}`, `frontTravel`/`rearTravel`/`sideTravel` (m), face positions, shell zone settings |
| `Cars.crushForce(m, S, x, face)` | crush force (N) of a whole face at crush depth `x` m. `face` = `"front"`, `"rear"` or `"side"` |
| `Cars.whenReady(car, timeout?)` | yields until the shell is built (default 5 s); returns true/false |
| `Cars.fromChassis(id)` | the handle, read back from a chassis id (any peer) |
| `Cars.despawn(car)` | removes the chassis, shell and any loose panels |
| `Cars.setVelocity(car, vx, vy, vz)` | sets chassis **and** shell velocity (world m/s): how a tow or launcher drives the car. Simulating peer only |
| `Cars.worldToLocal(e, p)`, `Cars.localToWorld(e, l)`, `Cars.localDir(e, l)` | frame helpers for any entity (arrays in, `{x,y,z}` out) |
| `Cars.GROUPS` | collision bits: `shell` = bit 20, `dummy` = bit 21. Put a dummy's colliders in bit 21 **only**: the shell fills the car's volume and is filtered against that bit |
| `Cars.mesh(model, look, part)`, `Cars.material(name)` | the package's authored mesh and material refs |
### The `CrashCar` component (on the chassis)
Methods (the ones that write are for the simulating peer):
- `:measureCrush(face?)` → `{ max, mean, lanes = {a, b, c}, left, centre, right }`, in metres,
for `"front"` (default), `"rear"`, `"left"` or `"right"`. On the owner it reads live values.
Other peers read the synced `lanes`, updated every 0.1 s.
- `:worstFace()` → `face, depth`.
- `:track(on, face?)`: while on, keeps the deepest crush of `face` in `crushMax`. Switching it on
resets `crushMax`, `energyJ` and `peakForceN`.
- `:settle(face?)`: stores the current crush in `crushResidual` and returns it.
- `:setExclude(ids)`: bodies the lanes look past, for example a dummy's bodies or a rig's props.
- `:brake(torque?)`: clamps every wheel's brake (default 6000 N·m); `0` releases it.
- `:repair()`: back to the built shape and forgets the crush. Panels that came off stay off.
Synced fields: `crushMax`, `crushResidual`, `lanes`, `energyJ` (J), `peakForceN` (N), `detached`
(`{"bumper", "bonnet"}`), `looseBumper`, `looseBonnet`, `ready`, and the tunables `reboundShare`
(0.06), `bumperOffAt` (0.26 m), `bonnetOffAt` (0.38 m) and `shapeZones` (true).
Events: `onPartDetached { part }` and `onImpact { face, speed, target }` (closing speed in m/s at
first contact, and the entity id of what the face met).
```luau
car.component.events.onImpact:connect(function(e)
print(e.face, "hit", e.target, "at", e.speed * 3.6, "km/h")
end)
```
## Catalog
Mass in kg, sizes in metres. *Front law* is the crush force as deceleration of the whole car, from
first touch to 85 % of the crush travel. Past 85 % the structure bottoms out and stiffens sixfold.
| id | name | class | mass | length | width | height | wheelbase | front law | front travel | seats |
|---|---|---|---|---|---|---|---|---|---|---|
| `city` | City car | A-segment city car | 950 | 3.60 | 1.64 | 1.50 | 2.40 | 15–42 g | 1.01 m | 4 |
| `hatch` | Hatchback | C-segment hatchback | 1250 | 4.10 | 1.78 | 1.46 | 2.62 | 15–42 g | 1.23 m | 5 |
| `saloon` | Family saloon | D-segment saloon | 1450 | 4.75 | 1.82 | 1.45 | 2.80 | 15–42 g | 1.39 m | 5 |
| `estate` | Estate | D-segment estate | 1550 | 4.80 | 1.82 | 1.48 | 2.80 | 15–42 g | 1.40 m | 5 |
| `suv` | SUV | mid-size SUV | 1850 | 4.60 | 1.88 | 1.70 | 2.75 | 17–48 g | 1.22 m | 5 |
| `pickup` | Pickup | full-size pickup | 2100 | 5.30 | 1.90 | 1.80 | 3.20 | 19–53 g | 1.23 m | 5 (2 seat frames) |
| `coupe` | Sports coupe | 2+2 sports coupe | 1500 | 4.40 | 1.85 | 1.30 | 2.55 | 16–44 g | 1.50 m | 4 |
| `mpv` | People carrier | MPV / minivan | 1750 | 4.80 | 1.88 | 1.75 | 2.95 | 15–42 g | 0.84 m | 7 (4 seat frames) |
| `classic60s` | 1960s steel saloon | 1960s body-on-frame saloon | 1300 | 4.60 | 1.75 | 1.42 | 2.70 | 39–109 g | 0.92 m | 5 |
`classic60s` has a stiff, short front and a weak cabin (`front = 2.6`, `cabin = 0.45`): it stops
harder, and its passenger cell deforms more. Rear faces use 12–34 g and sides 8–30 g, the side
travel growing with cabin strength. Seat frames are the `seat_*` children: `driver` and
`passenger`, plus `rear_left` and `rear_right` on every model but the pickup.
## Looks
The look changes how a car is drawn, never its physics.
| id | name | what it looks like |
|---|---|---|
| `realistic` | Realistic | Smooth production body, metallic paint, crash-test target stickers |
| `toy` | Toy | Rounded glossy plastic, saturated colours, chunky wheels |
| `lowpoly` | Low-poly | Faceted flat-shaded body in a flat palette |
Each model has its own paint per look. Paint is baked into the meshes' vertex colours and drawn
through white PBR materials (`materials/body_<look>`, `trim`, `wheel`, `windscreen`).
## How the crush works
- **Lanes.** Each face (front, rear, left, right) is three lanes. On the simulating peer, every
physics step, rays from inside the body find what stands in front of each lane. They see any
collider and soft-body surfaces. Where a lane's face meets something, the car is pushed back
with that lane's third of `Cars.crushForce(m, S, depth, face)`. If the obstacle is dynamic or
soft, it gets the opposite force. A pole meets one lane, an offset barrier one side, a wall all
three.
- **Force law.** In g of the car's weight, the force rises linearly from the first value of
`frontG` at no crush to the second at 85 % of `frontTravel`, then stiffens to 3x (`1 + Cars.BOTTOM_OUT`)
as the crumple zone bottoms out and the cabin structure takes over. Hit faster than 70 km/h, every lane
resists harder by `Cars.DYNAMIC` (strain rate, more members folding at once): 1.5x more per 15 m/s above
19.5 m/s, so a 120 km/h car is stopped by its crumple zone (1.39 m, 39 g mean) rather than by its cabin.
- **Never more than stops it.** The force is capped so it never more than stops the closing speed
in one step. When the face stops against the obstacle, it gives back `reboundShare` (6 %) of
the impact speed, the way crushed metal does. Against a moving body (a parked car, a moving
barrier, a loose panel) the cap uses the two masses together, so a light thing is not flung off.
- **Depth.** A lane's crush depth only grows: it is how far the obstacle has moved into the face.
- **Energy.** `energyJ` is the work the crush forces did on the closing motion, which is the
energy the car's structure absorbed. It is this part's own model: soft bodies don't report
absorbed energy (#20539).
- **Shape.** The shell's crush zones take the lanes' depths. `Physics.setSoftParticles` writes
their positions and their rest shape, so the dent stays, and it replicates to every peer like
any soft-body dent. The folds bow the sides out and the top up where the metal packed.
- **Panels.** While attached, the bumper slides back with the mean crush and the bonnet folds up
from its hinge. The bumper comes off past `bumperOffAt` (0.26 m), or when one side is crushed
0.12 m deeper than the other. The bonnet comes off past `bonnetOffAt` (0.38 m). Both become
loose synced bodies thrown off the car.
Measured through crashRig (hatchback, belted 50th-percentile adult, 2026-10-26).
Version 0.3.2, family saloon, belted 50th-percentile adult (classic), bollard, tow, two runs at each speed
(head = peak, chest = 3 ms clip):
| speed | crush | car pulse (peak / mean) | head | chest | with front airbags: head / chest |
|---|---|---|---|---|---|
| 30 km/h | 0.36 m | 12 / 9 g | 28 / 26 g | 14 / 13 g | 25 / 14 g |
| 50 km/h | 0.82 m | 16 / 11 g | 40 / 37 g | 22 / 20 g | 43 / 20 g |
| 70 km/h | 1.28 m | 29–30 / 16 g | 63 / 58 g | 38 / 36 g | 54 / 29 g |
| 90 km/h | 1.30 m | 59 / 28 g | 349–413 g (see below) | 61–63 g | — |
| 120 km/h | 1.39 m | 89 / 39 g | 600+ g (see below) | 195–360 g | — |
From 10 to 70 km/h every channel rises with speed and two runs agree within 8 %. Above about 80 km/h the
car's own numbers (crush, pulse) stay believable, but the dummy's head reading does not: its neck runs into its
joint stop and the head whips into it in one physics step. A stiffer neck made the solver diverge at 70 km/h,
so it was left as it is; the head reading above 80 km/h is the dummy model's limit, not a measurement.
Earlier the same day, with seat foam and a padded wheel but no positioning hold, door foam or load limiter
(hatchback, bollard):
| test | crush | car pulse (peak / mean) | head | HIC15 | chest 3 ms | energy |
|---|---|---|---|---|---|---|
| bollard 30 km/h | 0.35–0.36 m | 12 / 8–9 g | 26 g | 40–46 | 12–13 g | 43 kJ |
| bollard 50 km/h | 0.79 m | 17 / 11 g | 45–56 g | 157–250 | 22–30 g | 120 kJ |
| bollard 70 km/h | 1.14–1.15 m | 46–51 / 19–21 g | 97–125 g | 1007–1192 | 49–57 g | 235 kJ |
The rows below were measured earlier the same day, before the seat foam and the padded wheel; rear hits and
64–70 km/h frontal hits read higher on the head and chest then (rigid seat backs, rigid wheel).
| test | crush (max) | car pulse (peak / mean) | head | chest 3 ms | panels | energy |
|---|---|---|---|---|---|---|
| rigid wall 30 km/h | 0.21–0.22 m | 20 / 12 g | 16–32 g | 21–22 g | stay on | 43 kJ (= ½mv²) |
| rigid wall 50 km/h | 0.50–0.52 m | 24–29 / 16–19 g | 23–31 g | 27–31 g | bumper + bonnet off | 120 kJ |
| rigid wall 56 km/h | 0.57–0.61 m | 27–42 / 15–19 g | 34–67 g | 29–40 g | bumper + bonnet off | 145–149 kJ |
| rigid wall 70 km/h | 0.70–0.83 m | 38–69 / 23–27 g | 33–177 g | 40–73 g | bumper + bonnet off | 226–234 kJ |
| offset barrier 64 km/h | 0.75 m (0.66 on the far side) | 34 / 21 g | 86 g | 38 g | bumper + bonnet off | 186 kJ |
| small overlap 64 km/h | 1.21 m on the struck side, 0.19 on the other | 64 / 20 g | 114 g | 61 g | bumper + bonnet off | 193 kJ |
| side pole 32 km/h (side-impact dummy) | 0.25 m, the pole's lane only | 38 / 19 g | 53 g | 44 g | — | 47 kJ |
| rear moving barrier 50 km/h | 0.29 m | 13 / 8 g | 21 g | 24 g | — | 70 kJ |
Crush, car pulse and energy rise steadily with speed and repeat within a few percent. The head reading
varies more from run to run, as in real tests without an airbag: it depends on whether the head strikes
the steering wheel.
## Multiplayer
- Spawn on **one** peer (the host or the test rig's authority). `Cars.spawn` uses
`entity.spawnSynced` for every piece, so other peers receive the car and never spawn their own.
- The car simulates on the peer that spawned it. Only that peer runs the lanes and may call
anything that writes physics: `Cars.setVelocity`, `:brake`, `:track`, `:settle`, `:setExclude`,
`:repair`. `Physics.*` writes only work on the simulating peer.
- The dent replicates natively as soft-body particles. The chassis and loose panels replicate as
poses. The crush numbers replicate through the component's synced fields. `measureCrush` on a
replica reads them, up to 0.1 s behind.
- Every mesh and material is an authored asset inside the package, so every peer draws the same
car. Regenerate the meshes in edit mode after changing `specs` or `shape`, with
`require("crashCars.build").all(); require("crashCars.build").refs()`.
## Known limits
- **Wheels have no volume and can't come off** (engine issue #20543). They are `WheelCollider`s, so
a wheel hit is a hit on the body.
- **Soft bodies don't report the energy they absorbed** (#20539), so `energyJ` comes from the lane
model, not from the shell.
- **A kinematic body covers a frame's motion in its first step** (#21187). If a rig drives a car
kinematically, its first contact lands a frame early. Tow it as the dynamic body it is, with
`Cars.setVelocity` every step, as the example does.
- **The crush is a lane model**, three lanes per face. A narrow pole crushes a whole lane's width
(about a third of the car).
- **Two lane-model cars:** in a car-to-car side hit, each car's own lanes push, so the two forces add.
- **Rays need a surface:** the lanes only see an obstacle that has a collider or a soft-body
surface. A mesh with no collider is passed through. Give a pole a pole-sized collider: a convex
hull round a pole and its frame is as wide as the frame.
- **Side tests:** spawn the car with `noTrim = "left"` (or `"right"`) for the struck side. The door
trim that stops the occupant in other crashes is rigid, and an obstacle that accepts every
collision group would stop dead on it.
- **The shell touches nothing.** It is skin: light (3 % of the car), held to the cabin, shaped by
the lanes. It has no underside and no surface round the wheel arches, because a `WheelCollider`'s
ray reads no collision filter and would stand the wheel on its own body.
- **Don't despawn a car's child colliders during play.** A collider removed from a synced body
that way was seen to stay in the physics world under a dead id until the whole car was despawned.
## Seats, foam and the steering wheel
- `Cars.seatLayout(m)` lists each seat (`driver`, `passenger`, and `rear_left`/`rear_right` where the model has
them) with its seat back and head restraint, and for the driver the steering wheel. Each pad is
`{ face, n, up, rigid, halfX, halfUp, foam }` in the car's frame: `face` is the foam surface, `n` points out
of it, and `rigid` is the centre of the rigid frame behind it. The seat back leans back 23°, the torso angle
crashDummies seats at; nothing stands behind the rear bulkhead, where the rear crush zone is.
- `Cars.FOAM` holds the pad depths (m) and spring-damper rates: seat back 8 cm, head restraint 6 cm, wheel hub
on a collapsing column 10 cm.
- Every pad (foam, wheel column, door, airbag) is an explicit spring-damper applied once a physics step, so its
stiffness and damping are capped by the step and the body's mass (k·dt²/m <= 1.6, c·dt/m <= 1.1): at the
world default of 30 steps a second the pads stay stable, and at 60 every pad is exactly as tuned.
- `car.component:setOccupants(bodyIds)` registers an occupant's rigid bodies. Each step the foam pushes them out
along `n` (`k·penetration + c·closing speed`) and the car takes the reaction. Owner only.
- `car.component:fitSeats()` sets the seat up for the settled occupant, as a test lab does: the back's foam to
touch the torso (5 mm preload), the head restraint to a 4 cm backset. Call it after the occupant settles.
- `car.component:padState()` reports each body's gap to its pad and the peak foam force (debug).
- `Cars.GROUPS`: `shell`, `dummy`, `carBody` (every collider of a car's body) and `panel` (a loose panel, which
leaves `carBody` out of its filter so it never touches its own car). Collision groups apply per rigid body, not
per child collider.
- Frontal airbags (`Cars.spawn{ airbags = true }`, CrashCar field `airbags`): the driver's bag fills out of the
wheel hub, the passenger's out of the dash. They fire 15 ms after a frontal hit closing faster than 4.2 m/s
(15 km/h), fill in 30 ms, hold 100 ms, then vent over 120 ms; `airbagFiredMs` says when they fired (-1: not).
While a bag stands it pushes on each occupant body that meets it with a near-steady gas pressure over the
body's area plus a vent-flow term on its closing speed (`Cars.AIRBAG`), and gives back little on the way out.
The bag is drawn as a white cushion (a synced child `airbag_<seat>`) and stays draped after it vents.
- The door's inner trim beside each front occupant is foam too (`door` pad, sill to window frame), and the
steering wheel has no rigid collider: hub, collapsing column and rim are one pad that bottoms out on a stiff
spring (`kWheelBottom`), so nothing the occupant meets is met in a single physics step.
- A cramped rear bench (city car, coupe 2+2) keeps its foam where the occupant sits and leaves out the rigid
seat-back frame, so nothing rigid stands in the rear crush zone (`seat.noRigid`).
## After a test
- `car.component:park(true)`: the lanes stop, so the dent stays exactly what was measured and nothing the car rests
against (the wall, a replay ghost) can push it. The seat foam keeps holding the occupant. `park(false)` or
`repair()` resumes. crashRig parks the car as soon as it has taken its readouts.
- The lanes look through a soft body that collides with nothing (`collisionFilter` or `collisionMemberships` 0),
such as a replay ghost: rays meet every soft surface, whatever its collision groups.
- A car on WheelColliders doesn't sleep, even standing still, so its shell never "comes to rest" either.
# crashRig
A crash-test rig that **every player in a world shares**. Put one `CrashRig` component on a scene entity
and any player can set up a test (car, dummy, belt, obstacle, speed), run it, read the results and watch a
slow-motion replay. The rig builds on three sibling parts:
- **crashCars** (the crumpling cars),
- **crashDummies** (the ragdoll dummies and belts),
- **crashObstacles** (walls, barriers, poles, trees, moving barriers).
What it does on each run:
- **Spawns** the car, the dummy in its seat and the obstacle, all synced. Every player sees the same things,
and the dents and loose panels replicate.
- **Launches** the car one of four ways:
- a **tow** on a guide cable: speed builds over the first 60 % of the run-up and is released 1 m before
contact, as real tow rigs work;
- **drive**: the car drives itself, with rear-wheel drive, cruise control and a lane keeper;
- a **moving barrier** launched into a parked car's rear, for rear hits;
- a **side slide** into a pole, with the tyres' side grip released, for side impacts.
- **Measures** the dummy's head and chest and the car's pulse at the driver's seat. Motion probes sample
at the solver substep rate. Each channel is resampled to 1 kHz and filtered SAE J211-style: CFC 1000 for
the head, CFC 180 for the chest, CFC 60 for the car. From those come peak g, **HIC15**, the **3 ms clip**,
the car's peak and mean g, pulse length, crush (maximum and residual), energy, panels that came off, and a
**star rating** with good / acceptable / marginal / poor bands for head, chest and structure.
Each channel is filtered whole, then cut to the crash itself, from 120 ms before the rig sees the tested
face start to crush to 300 ms after (the brakes come on at +300 ms), so the tow and the braking never
set a peak.
- **Sets the seat up** for the dummy: after it settles, the rig hands the dummy's bodies to the car as
occupants (`setOccupants`) and fits the seat back's foam and the head restraint to it (`fitSeats`).
- **Publishes** a `CrashResult` in the synced `result` field, so every player gets the same numbers.
- **Records** what each player saw, so each player can replay it in slow motion. Pair it with
**crashCams**' director to show the replay from two or more angles.
## Install
Install `crashRig`, `crashCars`, `crashDummies` and `crashObstacles`; `crashCams` and `crashReadouts` are
the natural companions. Every part is required by its bare name (`require("crashRig.measure")`), so they
can sit in any folder.
## First example
Paste this into a scene's entrypoint. It works in play, in an empty world with any floor at y = 0 covering
x -10..10 and z -15..60, at the world's default 30 physics steps a second or at 60 (see "Physics rate" under
Known limits: the numbers this README quotes are at 60):
```lua
function onLoad()
local e = entity.find("CrashRig") or entity.spawnSynced("CrashRig")
local rig = e.component.get("crashRig.CrashRig") or e.component.add("crashRig.CrashRig", { origin = { 0, 0, 0 } })
task.spawn(function()
rig:request("prepare", { car = "hatch", carLook = "realistic", dummy = "adult50", dummyLook = "classic",
belt = "threePoint", obstacle = "wall", speedKmh = 56, mode = "tow" })
while rig.state ~= "ready" do task.wait(0.2) end
rig:request("run")
while rig.state ~= "results" do task.wait(0.2) end
local r = rig.result
if r.invalid then
print("invalid run, no rating: " .. r.invalidNote)
else
print(string.format("%.0f km/h: head %.0f g (HIC15 %.0f), chest %.0f g, crush %.0f cm, %d stars",
r.impactSpeedKmh, r.headPeakG, r.headHIC15, r.chest3msG, r.crushMaxM * 100, r.rating.stars))
end
local pb = rig:replay({ speed = 0.25 }) -- this player's slow-motion replay, as ghosts
end)
end
```
## API
`CrashRig` fields (all synced):
| field | meaning |
|---|---|
| `origin` | world point of the obstacle's impact face; the track runs toward +Z from it |
| `runup` | metres of tow (46) |
| `countdown` | seconds counted down before a launch (3) |
| `config` | `{ car, carLook, dummy, dummyLook, belt, obstacle, speedKmh, mode = "tow" \| "drive" }` |
| `state` | `idle`, `preparing`, `ready`, `countdown`, `running`, `settling` or `results` |
| `result` | the last `CrashResult` (below) |
| `message` | one human line about what the rig is doing |
| `carId`, `shellId`, `dummyRoot`, `dummyHead`, `dummyBodies`, `obstacleRoot`, `moverId`, `spawned` | what is on the track now |
| `testId` | how many tests have run |
Methods:
- `rig:request(action, config?)` works from **any** player.
- The rig's owner acts on it at once; anyone else's request reaches the owner over `multiplayer.send`.
- Actions: `"prepare"` (set the test up, then `ready`), `"run"` (count down, launch, measure, `results`),
`"reset"` (set the same or a new test up again), `"clear"`.
- `rig:replay({ speed = 0.25, loop, onDone, onFrame })` replays the last run on this peer only.
- It returns a playback with `stop()`, `time()`, `playing()` and `ghostOf(id)`, which gives the ghost
standing in for a live entity, for camera targets.
- The live crash entities are on the render layer `crash` ONLY (not `default` as well: a camera draws an
entity that shares any layer with it, so a wreck left on `default` showed under its own replay ghost as a
doubled car), so a replay camera draws
`"all !crash"` and sees only the ghosts.
- `rig:stopReplay()`, `rig:replayImpactTime()` and `rig:isBusy()`.
Modules:
- `crashRig.measure` holds the signal processing as pure functions: `channel`, `resample`, `cfc` (SAE
J211), `hic`, `clip3ms`, `peak`, `decimate` and `rate`.
- `crashRig.recorder` records any hierarchy's drawn poses and soft-body particles, and plays them back as
local ghosts: `new{ roots, track }`, `start`, `stop`, `trim`, `play`.
## CrashResult
`id`, `config`, `names{car,dummy,belt,obstacle}`, `mode`, `face`, `impactSpeedKmh`, `headPeakG`,
`headHIC15`, `head3msG`, `chestPeakG`, `chest3msG`, `carPeakG`, `carMeanG`, `crushMaxM`, `crushResidualM`,
`crushShare`, `energyKJ`, `structureKJ`, `energyNote`, `partsDetached`, `pulseMs`,
`rating{stars, head, chest, structure, score}`, `traces{dt, head, chest, car}` (filtered, ≤160 points
each), plus `invalid` / `invalidNote` when the solver diverged.
- **Energy:** `energyKJ` is the kinetic energy lost in the crash, ½mv² before minus after, with the moving
barrier included for rear hits. `structureKJ` is how much of it the car's crumple zone took, from the
crashCars lane model.
## Measured
Hatchback, 50th-percentile adult in a 3-point belt, rigid wall, 56 km/h, three runs:
| measure | result |
|---|---|
| crush | 0.56–0.61 m |
| car pulse | 34–42 g peak, 18–21 g mean, over ~100 ms |
| energy | 146–149 kJ (½mv² is 151 kJ) |
| head | 42–74 g, HIC15 70–450 |
| chest (3 ms) | 47–57 g |
| rating | 3–4 stars |
## Multiplayer
- One peer, the owner of the rig entity, runs each test. Everyone sees the same car, dummy, dents, loose
panels and numbers.
- If the owner leaves, the next owner finds the test half-run and sets it up again.
- Replays are per peer: each peer replays what it drew.
## Known limits
- **No simulation playback (#20544).** The engine can't record and play back the simulation, so the replay
is rebuilt from the poses and soft-body particles each peer drew. It is a faithful picture of what that
peer saw, not a re-simulation.
- **Ragdoll poses on other players' screens.** A ragdoll is drawn at physics-tick poses (#21188), and may
not show ragdolled for other players at all (#18554). Their replay of the dummy shows what they received.
- **Kinematic first step (#21187).** A kinematic body covers a frame's motion in its first step, so the rig
tows with velocities, never kinematically.
- **Waits are capped (#19849).** Long engine waits are capped, so a script waiting on a run should poll
`state` in short waits, as the example does.
- **Barrier energy (#20539).** Soft bodies don't report energy absorbed, so a crushable barrier's own share
of the energy is not in `structureKJ`; `energyKJ` (the kinetic energy lost) covers it.
- **Probe sample rate.** Probes sample at the physics substep rate, 240 Hz at a 60 Hz tick. Head and chest
are therefore band-limited by the physics rate: CFC 1000 / 180 filter nothing above roughly 120 Hz.
HIC15 and the 3 ms clip are computed on the 1 kHz resample.
- **Invalid runs get no rating.** The rig publishes a run as `invalid` (with `invalidNote` saying why, and
`rating = nil`: no stars) when its numbers can't be a crash test: the solver diverged (NaN, a head over
1000 g, a car over 400 g, a chest over 600 g); the car went much faster than the test asked before the hit
(`peakSpeedKmh` over 1.4x the target: a launch blow-up); or the car didn't arrive at the test speed (more
than 20 % off, 30 % for a ramp). The status line then starts "INVALID RUN (no rating)". crashReadouts draws
such a run with an INVALID stamp and no stars.
- **Physics rate.** A fresh world steps physics 30 times a second (`physics.tick_rate`); this world runs 60.
The rig works at either: every spring the rig and crashCars apply themselves (the positioning hold, the
seat, head-restraint, door and wheel foam, the airbag) is capped by the physics step and the body's mass,
so it can't overshoot and blow up at 30, and is untouched at 60. (Before that cap, at 30 the positioning
hold diverged a second into the tow and threw the car off at thousands of km/h.) The readings do depend on
the rate: family saloon, adult, 3-point, bollard, at 30 steps a second two series read head 16-18 /
23-39 / 38-42 g and chest 12-14 / 16-26 / 30-31 g at 30 / 50 / 70 km/h (crush 0.34 / 0.78-0.82 / 1.32-1.36 m),
against 26-29 / 37-40 / 49-54 g (one run in five at 70 km/h read 77) and 13-14 / 21-22 / 30-36 g at 60. At 60
every reading rises with speed and repeats within 20 %; at 30 the crush and chest rise, but the head spreads
more from run to run and a 50 km/h run can read as high as a 70 km/h one. For the readings this README and
crashCars' tables quote, set `physics.tick_rate = 60` in the world's settings (`/source/.world_settings`,
`[physics]`); the rig can't change the rate itself and warns once in the log when it is lower. Each result
carries `tickRate`.
- **Web build untested.** An agent can't start a browser engine to check the web build (#20946).
- **Wheels (#20543).** A car's wheels are WheelColliders: they have no volume and can't come off.
- **Publishing.** `zm push` can misreport its result (#21207, #21206, #21025): after a push, check the
world's published commit rather than trusting the message.
## Multiplayer checks (2026-10-26)
- Reset clears everything: three resets in a row left the world exactly as before (entities, bodies, colliders,
soft bodies), each new car undented to within 0.03 mm, and no replay ghosts left over.
- Every live test entity (car, shell, dummy, obstacle, moving barrier, and loose panels as they come off) is kept on
the render layer `crash` **on every peer**: layer membership isn't replicated, so each peer sets it, and
re-applies it as children stream in. A replay camera drawing `"all !crash"` then shows only the ghosts.
- What a second player needs is synced and verified with `multiplayer.explain`: the rig's `state`, `result`,
`message`, and the car's crush fields. No second client was connected for this check (#20946); a ragdoll may not
show ragdolled for other players (#18554).
## Round 3 (version 0.3.2): repeatable readings, three launch modes, airbags, 10–120 km/h
- **Repeatable readings.** The dummy settles counted in physics steps (until it is still relative to the car),
the seat is fitted, and from the start of the tow until the crush begins a **positioning hold** (the breakaway
tape a lab uses: a stiff, critically damped spring per dummy segment, in the car's frame) keeps the dummy where
it sat, so every test meets the obstacle from the same posture. The data window (−120 / +300 ms) hangs off the
physics step the crush began in, not off a frame. Family saloon, adult, 3-point belt, bollard, two runs each:
head 28/26, 40/37, 63/58 g and chest 14/13, 22/20, 38/36 g at 30/50/70 km/h (crashCars README has the table).
- **Launch modes** (`config.mode`): `tow` (cable tow, lets go 1 m before the barrier), `drive` (the car drives
itself in) and `ramp`: the tow lets go 0.5 m before a 3 m steel ramp whose lip stands 8 m out, angled 2–12°
(`crashRig.launch`) so the car comes down just short of the barrier; the impact speed is read when the crush
starts (a 50 km/h ramp test hits at 47.9 km/h). Frontal obstacles only; side and rear hits use the tow.
- **Airbags** (`config.airbag = "front"` or `true`): the car is spawned with crashCars' front airbags; the result
carries `airbag = { fitted, firedMs }` and the restraint name gains "+ airbag".
- **Speed**: any `speedKmh`; the game offers 10–120 km/h. Above about 80 km/h the car's crush and pulse stay
believable but the dummy's head reading does not (its neck runs into its joint stop): see crashCars' README.
- **`synced`** (default true): false runs the whole test on this peer only (offline, and the test suite, whose
play session holds no relay ownership).
- **Gallery** `examples/rigGallery.scene`: the three launch modes (with the ramp the rig builds) and every
restraint, each labelled, plain Models only (`examples/rigGalleryLayout`).
- **Tests** `crashRig.testSuite` (10): CFC filter, HIC15 against its closed form, 3 ms clip, monotonic readings,
decimation, star bands, recorder bookkeeping, and a whole 30 km/h wall test with airbags in play that publishes
a sane result and clears everything it spawned. Run `zero tests run crashRig` in edit mode.
# crashObstacles
The things a crash-test car is launched into, built like a real crash lab: a load-cell rigid wall,
the Euro NCAP 40 % offset deformable barrier, the IIHS 25 % small-overlap barrier, a security
bollard, a lighting column, a tree, a W-beam guardrail, a water-barrel crash cushion, a parked car,
the 254 mm side-impact pole and a 1400 kg moving deformable barrier for rear impacts. The crushable
ones are real soft bodies with plasticity, so a ~1300 kg car at 50 km/h leaves a dent that stays,
and the dent replicates to every player. The rigid ones do not move.
Every obstacle tells you how the car meets it (`frontal`, `side` or `rear`), where the car's
centreline should sit for the right overlap (`alignX`), and, for the rear test, which body the rig
launches instead of the car (`mover`).
## Install
Install the package `crashObstacles` from ZeroMind (it lands at `/source/parts/crashObstacles.package`
or wherever you install it) and require it by its bare name:
```luau
local Obstacles = require("crashObstacles.obstacles")
```
`crashCars` is an **optional** dependency: with it installed, the `parkedCar` obstacle is a
crashCars `saloon`; without it, crashObstacles uses its own compact saloon (rigid chassis + soft
denting body shell).
## First example
Paste into a host-only spot (a scene's `onHostLoad`, or an `execute` while playing). It spawns the
offset barrier, lines a 1300 kg test sled up 40 % offset, tows it at 50 km/h, lets go 1 m before the
face and prints the dent the honeycomb kept (0.14 to 0.15 m at 50 km/h: two runs read 0.136 and 0.154 m in a
fresh world at 30 physics steps a second; the example scene's sled measured 0.138 m at 60). The dent varies a
centimetre or two from run to run because the sled meets the honeycomb's particles at a slightly different
point of a physics step each time; the physics rate (`physics.tick_rate`) changes it by about as much:
```luau
--!strict
local Obstacles = require("crashObstacles.obstacles")
local o = Obstacles.spawn({ kind = "offset", position = { 0, 0, -20 }, synced = true,
vehicle = { width = 1.8, length = 4.2 } })
-- a 1300 kg box sled, its nose 3 m from the barrier face, lined up 40 % offset
local sled = entity.spawnSynced("Sled", { position = { o.alignX, 0.8, -20 + 2.1 + 3 } })
sled.localScale = { 1.8, 1.0, 4.2 }
sled.component.add("Model", { model = asset.resolve("cube", "mesh") })
sled.component.add("BoxCollider", {})
sled.component.add("Physics", { kind = "dynamic", mass = 1300 })
local towing = true
local stop = Physics.onBeforeStep(function()
if not towing then return end
if sled.position.z - 2.1 <= -20 + 1 then -- let go 1 m before the face
towing = false
return
end
Physics.setVelocity(sled.id, 0, 0, -50 / 3.6)
end)
task.wait(3)
stop()
print(("offset barrier kept a %.2f m dent"):format(Obstacles.dent(o)))
```
The package's example scene `examples/obstaclesDemo.scene` lays out all eleven obstacles in a lab
and runs the same test on play (component `ObstaclesDemoSled`), printing peak g, mean g and the
dent.
## Gallery
`examples/obstaclesGallery.scene` stands every obstacle in catalog order in one static test hall
(wall, offset, smallOverlap, bollard, pole, tree in front; guardrail, cushion, parkedCar, sidePole,
rear behind), each on its own pad with its impact face toward the camera and a placard giving its
name, id and mode. Each is the real `Obstacles.spawn` build (`synced = false`) stripped to its drawn
parts, so no soft body, rigid body or collider runs; the parked car is crashCars' drawn-only lineup car
when crashCars is installed. Its `galleryCamera` frames both rows. Load it additively (or open it) to
browse the obstacles.
## API
```luau
Obstacles.spawn(opts) -> Handle
```
| option | meaning |
|---|---|
| `kind` | one of the catalog ids below (required) |
| `position` | `{x, y, z}` on the ground at the centre of the impact face; the face points **+Z** (the car comes from +Z travelling toward −Z). Default `{0,0,0}` |
| `synced` | `true` (default) spawns with `entity.spawnSynced` / `addSynced` so every player has it: call on ONE peer (the rig authority). `false` for local or scene-build use |
| `vehicle` | `{ width, length, seatZ? }` of the car that will hit it, used for `alignX` (defaults 1.8 × 4.2 m) |
| `name`, `parent` | root entity name / parent |
| `car`, `builtinCar` | `parkedCar` only: `{ model, look }` passed to crashCars, or `builtinCar = true` to force the built-in car |
| `tune` | advanced: SoftBody field overrides for the crushable part (e.g. `{ stiffness = 5e4 }`) |
Handle: `{ root, kind, spec, alignX, mover, soft, parts, car }`
- `root` — the obstacle's root entity id (`attribute crashObstacle = kind`).
- `spec` — `{ id, name, mode, test, description, crushable, carYaw, alignX = function(vehicle) }`
plus extras (`rear.moverMass`, `rear.moverStart`, `rear.moverFaceOffset`, `sidePole.poleDiameter`,
`offset.barrier`).
- `alignX` — metres along +X the car's centreline should take (already computed for `vehicle`).
- `mover` — `rear` only: the trolley's dynamic body (1400 kg) that the rig launches along −Z.
- `soft` — ids of the soft (crushable) parts; `parts` — named child ids; `car` — crashCars handle.
Also: `Obstacles.despawn(o)`, `Obstacles.catalog()` → list of `{ id, name, mode, description, test,
crushable }`, `Obstacles.kinds()`, `Obstacles.spec(kind)`, `Obstacles.alignX(kind, vehicle)`,
`Obstacles.dent(o)` (deepest permanent dent in metres, read on the simulating peer) and
`Obstacles.repair(o)` (back to the built shape, on every peer).
## Catalog
| kind | mode | real-world test it represents | crushable? | measured at 50 km/h, 1300 kg rigid sled |
|---|---|---|---|---|
| `wall` | frontal | Full-width rigid barrier (FMVSS 208 / Euro NCAP FW) — 3.6 × 1.8 m block, steel face, 32 load-cell plates | rigid | does not move |
| `offset` | frontal | Euro NCAP / ECE R94 ODB, 40 % overlap: 1000 × 650 mm honeycomb (+ stiffer bumper element) 200 mm up | **yes** | 0.39 m dynamic crush, **~0.14 m permanent dent** (0.138 m in the example scene), 28 g mean / 66 ms |
| `smallOverlap` | frontal | IIHS small overlap, 25 %: 1.5 m rigid steel barrier, 150 mm radius edge | rigid | does not move |
| `bollard` | frontal | Narrow-object hit: 273 mm concrete-filled steel bollard | rigid | does not move |
| `pole` | frontal | Lighting column, 8 m octagonal galvanised, 240 mm at the root | rigid | does not move |
| `tree` | frontal | Run-off-road tree: mature Scots pine, 540 mm trunk | rigid | does not move |
| `guardrail` | frontal | W-beam guardrail, 3.81 m span between posts on the centreline | **yes** | 1.8 m dynamic deflection, rail stays bent (plastic 0.82), 7.4 g mean / 260 ms |
| `cushion` | frontal | Crash attenuator: 3 × 4 water-filled barrel array | **yes** | 2.8 m dynamic, **~2.0 m permanent crush**, 6 g mean / 250 ms |
| `parkedCar` | frontal | Car-to-car T-bone into a stationary car | **yes** (car shell) | built-in car: 0.17 m door dent, car shoved sideways, 17 g mean |
| `sidePole` | side | Euro NCAP / FMVSS 214 pole, 254 mm rigid; collides as a 254 × 254 mm box, 3.2 m tall, on the pole axis | rigid | does not move |
| `rear` | rear | Rear MDB (FMVSS 301 / R34 style), 1400 kg, 1700 × 500 mm face | **yes** | 0.13 m permanent face dent into a 1300 kg standing sled |
Peak g read on a rigid sled is a single 200–400 g sample at first contact (a rigid box has no
crumple zone); a car's own crush spreads it. Filter it (SAE J211) as a rig would.
## How the car meets each obstacle
- **Frontal** (`mode = "frontal"`): the car faces −Z (`carYaw = 0`) and travels −Z into the face at
`position`. Put its centreline at `position.x + o.alignX`.
- **Offset / small overlap**: `alignX` puts the barrier's inner edge on the 40 % (`offset`:
`0.5 + 0.1·width`) or 25 % (`smallOverlap`: `0.5 + 0.25·width`) line measured from the driver's
side. The driver sits on the left, i.e. −X when the car faces −Z.
- **Side pole** (`mode = "side"`, `carYaw = -90`): turn the car so its driver's side leads (local
−X → world −Z) and launch it along −Z. `alignX` puts the driver's H-point on the pole axis: it is
`vehicle.seatZ` (the seat's local Z, negative = ahead of centre) or −6 % of the length.
The pole's collider is a rigid 254 mm square `BoxCollider` (3.2 m tall, front face at
`position`) on the pole axis alone: the frame and base plate around it are visual only, so the
door meets a pole-width contact rather than a door-wide wall.
- **Rear** (`mode = "rear"`): park the car facing −Z with its rear bumper at `position`. The rig
launches `o.mover` (the 1400 kg trolley, its face `spec.moverFaceOffset` ahead of the body's
origin and starting `spec.moverStart` m behind `position`) along −Z into it, and releases it
1 m before contact like any tow.
- **Parked car**: the target car stands broadside, its side at `position`; the test car hits it
frontally (T-bone). It is dynamic and gets pushed.
## Multiplayer
Spawn with `synced = true` on one peer (the rig authority, e.g. behind `multiplayer.isHost()`).
Every mesh is an authored `.mesh` asset and every material a `.material` asset inside the package,
so every peer draws the same thing. Soft-body dents replicate natively from the simulating peer
(a replica never dents on its own, and late joiners get the settled shape). Rigid bodies (the
trolley, the parked car) replicate as poses. Push / tow only from the simulating peer.
`Obstacles.dent` reads the local solver, so read it there; `Obstacles.repair` goes through the
`SoftBody` component and reaches everyone.
## Built from
- Concrete (`concreteSmooth`) textures: **Brick and Mortar** masonry collection (MIT, ZeroMind).
- Aluminium, galvanised and raw steel textures: **Forge and Patina** metals collection (MIT, ZeroMind).
- Tree: **RAINLINE realistic mature coastal Scots pine** bundle from AFTERCURRENT (MIT, ZeroMind).
- Everything else (meshes, hazard stripes, chevrons, load cells, barrels, rails, trolley, fallback
car) is generated by `crashObstacles.meshgen` — run `require("crashObstacles.meshgen").buildAll()`
in edit mode to re-author the meshes after changing it.
## Known limits
- **Soft bodies don't report the energy they absorbed** (engine issue #20539). `Obstacles.dent`
gives the permanent dent; an energy figure has to come from the car's speed change.
- **A kinematic body covers a frame's motion in its first step** (#21187): a rig that drives the
trolley kinematically will deliver its first contact a frame early. Tow it as a dynamic body
with `Physics.setVelocity` each step (as the example does).
- The crushable faces are tuned soft bodies, not cell-level honeycomb: the crush force is right in
order of magnitude (pulses of 6–30 g on a rigid sled) but not certified to the 0.342 / 1.711 MPa
ODB spec.
- The offset honeycomb and the MDB face rest on a 30 mm steel tray (it carries their weight; a soft
body this soft would otherwise creep under gravity). On the ODB the tray is set 150 mm back from
the face at 170–200 mm height, so only a car part lower than 200 mm that crushes more than
150 mm reaches it.
- The guardrail's posts are rigid and the rail is bolted (pinned) to them; the car meets the
3.81 m span between the two centre posts. A hit on a post itself is a rigid hit.
- `rear`: the trolley slides on a low-friction skid rather than rolling on wheels.
- `parkedCar` with crashCars depends on that package's car; its own limits apply
(wheels have no volume and can't come off, #20543).
# crashDummies
Ragdoll crash test dummies for vehicle crash tests. Installing it gives a world six dummy kinds in
five looks, made of rigid bodies with realistic segment masses, anatomical joint limits and
"muscle tone". They sit in any vehicle that carries a seat frame and belt anchors, held by
compliant seat belts you can see, with accelerometers on the head, chest and pelvis. It also ships
a tow-sled test rig as a working example.
- `dummies.module`: the API, `require("crashDummies.dummies")`.
- `sled.module`: a test sled + tow rig, `require("crashDummies.sled")` (example / standalone tests).
The tow brakes the sled to rest within about 0.5 s of the rebound, so it settles at the wall.
- `CrashDummy.component`: on each dummy root; draws the webbing (every peer) and runs the belts (simulating peer).
- `examples/DummySledDemo.component` + `examples/dummiesDemo.scene`: the first working example.
- `materials/`: 21 `.material` assets (five looks, webbing, buckle, booster, child seat).
## Install
Install the package into the world (`zeromind.install` with its guid), then
`require("crashDummies.dummies")` works from any script by its bare name.
## First working example
Copy-paste into a script or an `execute` call while the world is in play. It builds a test lane at
the origin, seats a belted Hybrid III 50th on the package's sled, tows it into the wall at 50 km/h
and prints the peaks. (This exact code passes the strict checker.)
```lua
local Dummies = require("crashDummies.dummies")
local Sled = require("crashDummies.sled")
-- a test lane at the origin: rigid wall face at z = 0, sled 75 m up the lane
local rig = Sled.build({ x = 0, y = 0, wallZ = 0, startZ = 75 })
local d = Dummies.spawn({ kind = "adult50", look = "classic", belt = "threePoint",
vehicle = rig.sled, seat = "seat_driver", synced = true })
task.wait(1.5) -- let the dummy settle into the seat first: a dummy still slumping reads differently every run
-- accelerometers on the head, chest and pelvis, read every physics step
local probes = Dummies.instrument(d)
local stopReading = Physics.onAfterStep(function() probes.read() end)
-- tow to 50 km/h, let go 1 m before the wall; zero the peaks at the release. `hold = d` keeps the
-- dummy where it sits until the crush starts (a lab's breakaway tape), so runs repeat
Sled.tow(rig, 50, function() probes.reset() end, { hold = d })
task.wait(25)
print(string.format("head %.0f g, chest %.0f g, pelvis %.0f g",
probes.peak.head, probes.peak.chest, probes.peak.pelvis))
print("belt loads (N):", probes.belt())
stopReading()
probes.stop()
```
Or open `examples/dummiesDemo.scene` and press play: its `DummiesDemo` rig does the same and writes
the results to its synced `lastHeadG` / `lastChestG` / `lastPelvisG` / `lastSledG` / `lastBeltN`
fields.
## Gallery
`examples/dummiesGallery.scene` shows the whole catalog in one static hall: every kind (rows: adult50,
adult5, adult95, child6 on its booster, toddler in its child seat, sid) in every look (columns: classic,
modern, cartoon, wooden, scifi), each on a test seat buck with a placard naming the kind and the look,
and in front a restraint row: each belt (none → racing harness) on a classic 50th male, then the
6-year-old with the car's 3-point belt through its booster and the toddler in its 5-point harness. It is
built with `Dummies.spawnVisual`, so nothing simulates; its `galleryCamera` frames the hall. Load it
additively (or open it) to browse the dummies.
## API
```lua
local d = Dummies.spawn({
kind = "adult50", -- see Kinds
look = "classic", -- see Looks
belt = "threePoint", -- see Belts
vehicle = chassisId, -- the vehicle's rigid body entity (id or proxy)
seat = "seat_driver", -- name of the seat-frame child entity
synced = true, -- entity.spawnSynced: every player sees the dummy
tone = 0.5, -- joint resistance 0 (limp) .. 1 (stiff)
handsInLap = false, -- true: hands rest on the thighs instead of the wheel
})
```
Returns a handle:
| field | what |
|---|---|
| `d.root` | root entity (`CrashDummy_<kind>`), carries the `CrashDummy` component |
| `d.bodies` | `{ head, neck, chest, abdomen, pelvis, upperArmL/R, forearmL/R, thighL/R, shinL/R }` entity ids (`sid` has no forearms) |
| `d.head`, `d.chest`, `d.pelvis` | the instrumented bodies |
| `d.spec` | `{ id, name, mass, stature, seat, belt, look }` |
| `d.belt` | the restraint id actually used (a `child6` asked for `harness` uses `threePoint`) |
| `d.straps` | each strap: `{ name, body, anchor, k, L, force, peak }` (force / peak in N) |
| `d.joints` | the Joint components by name (`lumbar`, `thorax`, `neckLow`, `neckHigh`, `hipL`, `kneeL`, `shoulderL`, `elbowL`, ...) |
| `d.booster` / `d.childSeat` | the child restraint prop's entity, for `child6` / `toddler` |
- `Dummies.despawn(d)` removes the dummy and its booster or child seat.
- `Dummies.spawnVisual({ kind, look, belt = "none", parent?, position?, yaw?, synced = false, name? })` builds the
dummy's LOOK only, in its seated pose (H-point at `position`, facing local -Z turned by `yaw` degrees), with its
booster / child seat and, for a `belt`, the webbing drawn once from anchors it places itself (driver's door on
-X). No physics, joints or collision filters, so it works inside a scene build (galleries, showrooms, menus).
Returns `{ root, kind, look, belt, bodies, booster?, childSeat? }`; the root carries attribute
`crashDummyVisual = kind`. Remove it with `entity(v.root):despawn()`.
- `Dummies.setTone(d, x)` sets joint resistance live (0..1).
- `Dummies.instrument(d)` returns `{ read(), reset(), peak = { head, chest, pelvis }, trace = { head = {g...}, ... }, belt(), stop() }`.
Motion probes (`Physics.probeMotion`) on the three bodies sample every solver substep
(240 Hz at the 60 Hz tick). Call `read()` every step (from `Physics.onAfterStep`) or at least
every few frames (4096 samples are kept).
- `Dummies.catalog()`, `Dummies.looks()`, `Dummies.belts()` list the variants (below).
- `Dummies.COLLISION_GROUP` = `2097152` (bit 21): the membership every dummy, booster and child-seat
collider carries (filter: everything). A car's soft crumple shell leaves bit 21 out of its filter so it
never touches the occupant.
## What the vehicle must supply
`Dummies.spawn` works on any vehicle body carrying these **child entities** (names exact):
- `seat_<x>` (e.g. `seat_driver`): the seat's **H-point** (hip-joint centre of a seated occupant),
its local -Z = the car's forward, +Y up.
- `belt_<seat>_lapOuter`, `belt_<seat>_lapInner`, `belt_<seat>_shoulder` (the D-ring), and optionally
`belt_<seat>_buckle` (else the diagonal strap ends at `lapInner`). Both `belt_seat_driver_lapOuter`
and `belt_driver_lapOuter` spellings are found. Outer/inner are decided by which side of the seat
each anchor is on, so left- and right-hand drive both work.
- `steering_wheel` (rim centre), for a driver seat: hands are lightly taped to the rim
(breakable ball joints, ~220 N, they let go in the crash). No wheel: hands rest on the thighs.
The **colliders are the car's**, on its chassis body:
a seat cushion whose top is about **0.10 m below the H-point**; a seat back whose front face runs
about **0.15 m behind the H-point at hip height**, reclined about 23°; a floor about **0.39 m below
the H-point** for the feet; a knee bolster / dash about 0.6 m ahead; the steering wheel. A rigid
steering hub reads 250 g on an unbelted chest. Make it collapse (the sled's hub is a 0.5 kg pad on a
spring-damped column capped at 6 kN over 0.35 m) or add an airbag.
## Catalog
### Kinds (masses in kg; forearm includes the hand, shin includes the foot)
| id | dummy | total | stature | head | neck | chest | abdomen | pelvis | upper arm (each) | forearm (each) | thigh (each) | shin (each) | seat |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| `adult50` | Hybrid III 50th male | 77.6 | 1.75 m | 4.5 | 1.5 | 17 | 7 | 16 | 2.0 | 2.3 | 6.0 | 5.5 | vehicle seat |
| `adult5` | Hybrid III 5th female | 50.0 | 1.51 m | 3.7 | 1.0 | 10.7 | 4.5 | 9.8 | 1.3 | 1.45 | 3.9 | 3.5 | vehicle seat |
| `adult95` | Hybrid III 95th male | 101.9 | 1.88 m | 5.0 | 1.8 | 22.5 | 9.5 | 21.5 | 2.7 | 3.0 | 8.0 | 7.1 | vehicle seat |
| `child6` | Hybrid III 6-year-old | 23.0 | 1.17 m | 3.2 | 0.6 | 4.9 | 2.0 | 3.9 | 0.55 | 0.55 | 1.65 | 1.45 | booster cushion (supplied) + car belt |
| `toddler` | Q3 3-year-old | 15.0 | 0.95 m | 2.7 | 0.4 | 3.0 | 1.3 | 2.5 | 0.35 | 0.35 | 1.0 | 0.85 | child seat (supplied) with its own 5-point harness |
| `sid` | SID side-impact dummy | 77.0 | 1.75 m | 4.5 | 1.5 | 21 | 8 | 16 | 1.5 (stub) | none | 6.0 | 5.5 | vehicle seat; shoulder/rib module, arm stubs |
The booster and the child seat are rigid bodies fixed to the vehicle at the seat frame (an
ISOFIX-style fixed joint) and kept out of the car's own collisions. Child kinds use their seat's
restraint: `child6` takes the car's belt through the booster (`harness` falls back to
`threePoint`); `toddler` uses the child seat's 5-point harness for any belt but `none`.
### Looks
| id | look |
|---|---|
| `classic` | yellow vinyl, black joints and neck, black-and-yellow quadrant targets on head and hips, sternum plate |
| `modern` | grey THOR-style skin, exposed rib stack, orange instrumentation accents |
| `cartoon` | bright blue / red / yellow, chunky limbs, big head with eyes and grin |
| `wooden` | artist's mannequin: pale beech segments, walnut joint balls |
| `scifi` | gloss white shell, black joints, cyan emissive visor, rings and spine light |
### Belts
| id | restraint | webbing stiffness | slack + spool-out | pretension | load limiter |
|---|---|---|---|---|---|
| `none` | unbelted | none | none | none | none |
| `lap` | 2-point lap belt | 60 kN/m per strap | 1 cm | none | none |
| `threePoint` | lap + diagonal shoulder strap | 50 kN/m | 2 cm lap / 4 cm shoulder | none | none |
| `pretensioner` | 3-point + pyro pretensioner + load limiter | 50 kN/m | as 3-point | 6 cm shoulder / 3 cm lap in 50 ms after the car passes 4 g | shoulder straps pay out above 4 kN |
| `harness` | racing 6-point (2 shoulder straps from behind the seat, lap, crotch) | 75 kN/m | 0.8 cm / 0.4 cm | none | none |
## How the belts work
Each strap runs from a point on a dummy body (pelvis front for the lap, clavicle and lower sternum
for the diagonal, tops of the shoulders for a harness) to an anchor, as a solver **spring joint**.
Every physics step, on the peer that simulates the dummy, the `CrashDummy` component sets each
spring's rest length so the strap is **one-sided webbing**: it pulls with `k * stretch` (plus damping)
once the webbing is taken up, never pushes, and stays slack until then. The pretensioner shortens
the webbing when the vehicle's deceleration passes 4 g; the load limiter lets webbing pay out to keep
the shoulder force at its limit. A rigid rope instead gives 1000 g spikes. Anchors are read on the
rigid body that carries them, so the belt follows the car at the physics rate.
Strap loads are in `d.straps[i].force` / `.peak` and `probes.belt()`.
The webbing you see is cosmetic: thin dark straps (local to each peer) that follow each anchor and
body point at their drawn pose every frame, plus the lap and chest runs and the buckle.
## How the dummy is built
15 rigid bodies (13 for `sid`): head, neck, chest, abdomen, pelvis, upper arms, forearms + hands,
thighs, shins + feet; capsule / box / sphere colliders; `collideConnected = false` between
neighbours. Spine, neck, hips and shoulders are generic joints with anatomical per-axis limits
(flexion / extension / side bend / twist; e.g. neck 48° + 38° flexion, lumbar 28° flexion / 10°
extension); elbows and knees are hinges limited from straight to fully bent. Every joint carries a
capped spring-damper motor toward the seated pose (the dummy's "tone": heavy and floppy, not a noodle;
`setTone` scales it). Colliders are members of collision bit 21 only.
## Measured (sled, adult50)
The package's sled has a progressive crush-can nose; its pulse peaks at about 18 g at 30 km/h,
31 g at 50 km/h and 58 g at 70 km/h (0.39 / 0.76 / 1.14 m of crush). Peak g at the probes, raw
substep samples.
**The first example as written** (3-point, 50 km/h, 1.5 s settle, `hold = d`), measured 2026-10-26 (version 1.0.3):
| physics rate | head | chest | pelvis |
|---|---|---|---|
| 60 steps a second, with the hold (3 runs) | 69 / 105 / 81 g | 43 / 57 / 29 g | 42 / 38 / 41 g |
| 60, settle but no hold (3 runs) | 63 / 136 / 103 g | 41 / 31 / 48 g | 45 / 34 / 32 g |
| 30 (a fresh world's default), settle, no hold (3 runs) | 121 / 63 / 69 g | 35 / 34 / 32 g | 35 / 39 / 31 g |
| 30, no settle, no hold (2 runs) | 111 / 58 g | 36 / 48 g | 31 / 38 g |
**What changes the numbers, biggest first:**
- **Settling.** A dummy towed while it is still slumping into its seat meets the wall from a different posture each
run; a run straight after spawning can read head 150 g and chest 120 g. Wait about 1.5 s after `Dummies.spawn`.
- **The sled is a bare test sled.** Its head meets a small collapsing hub with no foam, belt geometry or airbag
around it, so where the head lands on the hub varies and the **head** reading spreads by up to about 1.5x run
to run even with the hold; pelvis repeats within about 10 % and chest within about 30 %. For repeatable
head and chest readings (within 20 %) put the dummy in a crashCars car on the crashRig rig, which seats it
against padded foam, a collapsing wheel and a door pad: there a saloon at 30 / 50 / 70 km/h reads head
about 26-29 / 37-40 / 49-63 g and chest 13-14 / 21-22 / 30-36 g.
- **Physics rate** (`physics.tick_rate` in the world's settings: 30 in a fresh world). The probes sample at the
physics substeps, so the rate changes the peaks the dummy reads; numbers in this README are at 60 unless a
row says 30.
- **The positioning hold** (`Sled.tow(rig, kmh, onRelease, { hold = d })`) keeps the dummy where it sat until the
crush starts, as a lab's breakaway tape does; it narrows the spread a little.
Older figures (60 steps a second, before the settle, from an earlier version; run-to-run spread not measured
then, so read them as one sample each):
| | 30 km/h | 50 km/h | 70 km/h |
|---|---|---|---|
| 3-point: head / chest / pelvis | 61 / 19 / 26 | 57-64 / 44-56 / 31 | 93 / 65 / 55 |
| unbelted: head / chest / pelvis | 44 / 13 / 22 | 78 / 33 / 55 | 191 / 61 / 81 |
At 50 km/h the other kinds and belts read (head / chest):
harness 55 / 72, lap belt 267 / 55 (jack-knife into the knees and wheel), pretensioner 120-167 / 33-40
(the limiter's pay-out lets the head reach the hub; pair it with an airbag), adult5 88 / 40,
adult95 47 / 26, child6 on booster 125 / 52, toddler in child seat 47 / 58, sid 121 / 30.
In a crashCars hatch at 50 km/h (1.05 m crush): head 23, chest 19, pelvis 31 g.
Unbelted chests read lower than belted on the sled because they land on its collapsing hub.
## Multiplayer
`synced = true` (the default) spawns every body, collider and visual with `entity.spawnSynced`, so
call `spawn` on one peer only (the rig's authority). Rigid bodies replicate as poses; the belts run
on the spawning peer (it holds the strap state); every other peer's `CrashDummy` rebuilds the
strap plan from its synced fields and the entity names and draws the same webbing. `Physics.*`
writes (tone, impulses) only take effect on the simulating peer.
## Known limits
- A ragdoll is drawn at physics-tick poses (engine issue **#21188**): the dummy steps at 60 Hz on
screen rather than blending between ticks.
- A ragdoll may not show ragdolled for other players (**#18554**): remote peers can see the dummy
hold a stale pose. Not worked around.
- A kinematic body covers a frame's motion in its first step (**#21187**). The tow rig therefore
drives a dynamic sled with `Physics.setVelocity` every step instead of a kinematic carrier.
- CCD makes the solver jitter by hundreds of g on a body riding a fast vehicle (a dummy coasting at
50 km/h read 400 g with it, 1.0 g without), so dummy bodies run without CCD. Segments are thick
enough not to tunnel at occupant-to-cabin speeds.
- A body whose own entity carries no collider gets a default 1 m box from the engine even when
its children carry colliders, so every dummy body carries a small core sphere itself.
- Ball joints here enforce only their twist limit (the swing cone is not applied), so every
multi-axis joint is a `generic` joint with explicit per-axis limits.
- Peaks are raw substep samples (no SAE J211 filtering here). The crashRig part filters.
- Hand-taping joints are re-created per spawn and break on impact; they are not re-armed.
- Arms do not collide with the head or neck (flailing forearms hitting the head swamped the head
accelerometer). They still hit everything else.
## Belts and the load limiter (version 1.0.2)
The plain 3-point belt now has the load limiter every modern 3-point belt carries: its shoulder strap pays out
above 6 kN (the pretensioner variant keeps its 4 kN limiter). The neck's muscle tone is unchanged; a stiffer
neck was tried for high-speed tests and made the solver diverge, so above about 80 km/h the head whips into its
joint stop and its reading is the model's limit, not a measurement.