Log inGet started
World

Crumple Zone: Crash Test Dummy Simulator

Branchmain
Commit8d4e06b8c8

README.md

CarsDemo

The crashCars example's test run. Put it on an entity standing on the ground at the centre of a rigid wall's impact face (face pointing +Z); examples/carsDemo.scene does exactly that. It needs no sibling components: it spawns everything itself with Cars.spawn.

In play, on one peer only (the host, or the only peer offline), it spawns a model car (hatch) runUp m up the lane, tows it at speedKmh (50) with Cars.setVelocity every physics step, lets go releaseGap m (1 m) before the wall, brakes once the car has stopped against the wall, and records the crush (crushM, meanCrushM), the peak g, the energy the structure absorbed against the release ½mv² (energyKJ, kineticKJ), the crush 1.5 s later and the panels that came off, on synced fields and in the log. With lineup on it also stands one car of every catalog model in a row beside the lane (lineupLook, lineupGap, lineupOffset). Leaving play despawns the cars.