Vehicles

Steering

Turns wheels marked for steering by multiplying normalized driver input by each wheel's maximum angle.

The high-level setter clamps input to -1..1. Negative means full left, positive means full right, and zero returns the requested steering angle to center.

Configuration#

GML
car.add_wheel(-0.8, 1.4, -0.2, {
    steering: true,
    max_steering_angle: 35
});
ValueMeaning
-1Maximum left steering.
0Centered steering.
1Maximum right steering.

Runtime input#

GML
car.set_steering(steering);
// or update all four controls atomically:
car.set_inputs(throttle, steering, brake, handbrake);

Useful state#

  • get_wheel(index).steering_angle returns the current native angle in degrees.
  • Different steering wheels may use different maximum angles.
  • A wheel with steering=false defaults to a zero maximum angle.
  • Steering input wakes the chassis even when throttle is zero.

Verified operation contracts#

These contracts distinguish units, return values, errors and lifetime according to the current implementation. Check results: false, 0 and undefined can mean different things for different methods.

Symbol / ownerSignatureOperation contract
JoltVehicle.set_steeringJoltVehicle.set_steering(value)Built live vehicle; Boolean. Throttle/steering clamp -1..1, brake/handbrake 0..1. Single setters preserve other inputs; set_inputs defaults brakes to 0.