Log inGet started
World

Tumble Troupe: Ragdoll Character Roster Kit

Branchmain
Branchesmain
Commitc61d49704c

README.md

sled

A test sled for crash dummies: require("crashDummies.sled").

build(opts) lays a frictionless roller track, a rigid wall (impact face at wallZ, pointing +Z, with a chevron band) and a rail-guided 600 kg sled with: seat cushion, reclined seat back, head restraint, knee bolster, a steering wheel whose hub is a padded collapsing pad (0.5 kg on a spring-damped column, 6 kN cap over 0.35 m), the child entities a dummy needs (seat_driver, belt_seat_driver_lapOuter / lapInner / shoulder, steering_wheel), and a crush-can nose: a block on a prismatic joint whose capped motor resists the crush with crushF0 + crushK * x (40 kN + 250 kN/m by default), giving a real crash pulse (about 18 g at 30 km/h, 31 g at 50, 59 g at 70) instead of a rigid stop.

tow(rig, speedKmh, onRelease?) ramps the sled up at 4 m/s² and holds its speed every physics step (Physics.onBeforeStep + Physics.setVelocity) until the nose is 1 m from the wall, then lets it go — the way a real tow rig works. After the impact it brakes: once the sled's speed toward the wall has reversed (or fallen under 1 m/s with the nose crushed), the same hook damps the sled to rest in about 0.5 s and holds it there, so the rebound does not roll it back up the frictionless track. Returns a function that stops the hook (and with it the brake).

Used by the package's DummySledDemo example; any vehicle carrying the same child entities works with Dummies.spawn.