Skip to content

WheelDesc

Extends EngineObject.

One wheel of a vehicle. The vehicle's space has +Z forward, +Y up and +X to its left (glTF's). Its Position is where the wheel's center sits with its suspension fully extended: the suspension reaches SuspensionLength above that, and the wheel rests somewhere in that travel under the load.

Create one with WheelDesc.new().

Properties

  • position: Vector3 Where the wheel's center is with the suspension extended, in the vehicle's space.
  • entity: Entity An entity (usually a child of the vehicle's entity) whose local transform follows the wheel each frame: its place on the suspension, steered and spinning. 0 for none.
  • radius: number
  • width: number
  • suspension_length: number How far the wheel can move up from its extended position.
  • suspension_frequency: number The suspension's natural frequency in Hz: higher is stiffer.
  • suspension_damping: number 1 is critically damped.
  • max_steer_angle: number How far the wheel turns at full steering, in degrees (0: it does not steer).
  • steer_ratio: number How much of the steering a wheel takes, and which way: 1 for front wheels, -1 for rear steering, 1 on every axle for crab steering. A wheel with no steer angle counts as ratio 0, the fixed axle. With two wheels of different ratios the steered wheels turn about one turning center (Ackermann).
  • powered: boolean Whether the engine drives it (wheeled vehicles) or it is the track's sprocket (tracked).
  • max_brake_torque: number Brake torque in N·m at full brake.
  • max_handbrake_torque: number
  • friction: number Scales the tire's grip (1 is Jolt's default tire).
  • torque_share: number The share of the engine's torque this wheel's axle gets, among the powered axles. By the load on the axles, a lightly loaded front axle would spin.
  • brake_factor: number Scales the brake torque while driving: an ABS or a one-sided brake sets it per step (see Vehicle.SetBrakeFactor).