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#
car.add_wheel(-0.8, 1.4, -0.2, {
steering: true,
max_steering_angle: 35
});| Value | Meaning |
|---|---|
| -1 | Maximum left steering. |
| 0 | Centered steering. |
| 1 | Maximum right steering. |
Runtime input#
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 / owner | Signature | Operation contract |
|---|---|---|
| JoltVehicle.set_steering | JoltVehicle.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. |