VehicleDrivetrain
Since 0.6
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
engine | VehicleEngine | no | |||
gears | number[] | no | Forward gear ratios, first gear first, each greater than zero and strictly descending. Wheel torque is engine torque times the gear times finalDrive. An override REPLACES this array whole. | ||
reverseGear | number | no | Reverse gear ratio, a positive number like the forward gears. The direction is the solver's, not a sign here — writing a negative ratio is a vehicle-invalid violation, not a reverse gear. | ||
finalDrive | number | no | Differential ratio multiplying every gear, greater than zero. Typically 3..4.5. | ||
differential | VehicleDifferential | no | open, locked, lsd | ||
shift | VehicleShift | no | auto, manual | ||
shiftUpRpm | number | no | 0 | Engine speed in rpm at which an automatic gearbox changes up, greater than zero and not above redlineRpm. Defaults to 0.9 x redlineRpm, so an engine that says nothing shifts just short of the limiter. Shifting earlier is what makes a van or a diesel feel like one. Ignored when shift is manual. | |
shiftDownRpm | number | no | 1 | Engine speed in rpm at which an automatic gearbox changes down, greater than zero and not below idleRpm. Defaults to 1.6 x idleRpm. It must sit below shiftUpRpm in the next gear up or the box hunts. Ignored when shift is manual. | |
shiftTime | number | no | 0 | Seconds the gearbox spends with no drive while it changes gear, zero or more. Defaults to 0.25. 0 is an instant shift, which is what an arcade vehicle usually wants; a torque-converter automatic is nearer 0.5. |