Torque Valley: Driving, Drift and Crash Sandbox
README.md
torqueCars
Checks the torqueCars package's data and assembly, deterministically and without stepping physics:
- Catalog: 12 kinds, 9 engines, 5 gearboxes, 3 diffs, 8 tyre sets, 12 paints and 3 looks, with every order list matching its table and every kind's default parts resolving.
- Engines: each torque curve rises to its peak and then falls, ending at 0 N·m on the limiter.
torqueAtinterpolates and clamps, andpeakHpmatches the published power (v8 455 hp, i4 122 hp). - Gearboxes: forward ratios strictly descend, and reverse is positive.
- Lookups:
part/kindfall back to the kind's defaults, an unknown slot raises, andAssemble.resolvefills look, paint and parts. - Assembly: wheel mounts follow track and wheelbase, and the drivetrain network matches the drive layout (FWD/RWD 7 parts, AWD 9 with a centre diff).
Assemble.spawnbuilds chassis, four WheelCollider wheels with tyres, a ShaftNetwork, a SoftBody body shell and theCarcomponent, and despawning removes all of it. - Part swaps: rebuilding in place keeps the entity ids and takes the new engine curve, gearing and tyre grip.
Car:setPartwrites the slot's field, and an unknown slot raises.
It leaves alone anything that needs the simulation running: driving, shifting, ABS/TC, damage, the published car.* values and the 0–100 / braking figures (see torqueCars.bench), as well as the garage UI and multiplayer sync. Cars are spawned far below the world (y = -500) and despawned after each test.
Run it in edit mode:
return asset.resolve("torqueCars", "testSuite"):run()