Skip to content

VehicleDesc

Extends EngineObject.

A vehicle: its engine, drivetrain and wheels. Give it to PhysicsWorld.CreateVehicle with the entity of a dynamic body.

Create one with VehicleDesc.new().

Properties

  • drive: DriveKind
  • wheels: { WheelDesc }
  • engine_max_torque: number Torque at the best rev, in N·m.
  • engine_min_rpm: number
  • engine_max_rpm: number
  • engine_torque_curve: { number } The torque at each rev as a share of the maximum, sampled evenly from 0 to the maximum rpm (at least two values); empty is the same torque at every rev.
  • engine_inertia: number The engine's flywheel inertia in kg·m².
  • differential_ratio: number The final drive: engine revs per wheel rev, before the gear the game drives through.
  • clutch_slip_rpm: number How many rpm the clutch slips at full engine torque: lower is a stiffer clutch.
  • track_brake_torque: number Brake torque of a track's sprocket (tracked vehicles).
  • max_pitch_roll_angle: number The vehicle's body is helped upright beyond this pitch or roll, in degrees.