Vehicles
Suspension
Controls wheel travel, spring response and the local point at which suspension force acts on the chassis.
Jolt solves suspension load from current contact, chassis mass and motion. The managed layer exposes frequency/damping tuning instead of asking GameMaker code to apply wheel forces.
Travel geometry#
- The hard point is the local position passed to add_wheel().
- suspension_min and suspension_max are full lengths, with minimum not greater than maximum.
- The default direction is local -Z. Custom directions are normalized and must be non-zero.
- Without a custom force point, force acts at the midpoint below the hard point between min/max travel.
Spring settings#
| Setting | Increase it to... | Trade-off |
|---|---|---|
| suspension_frequency | Support the body more firmly and respond faster. | Too high can make the car nervous or numerically stiff. |
| suspension_damping | Reduce repeated bouncing. | Too high can prevent the wheel following uneven ground. |
| suspension_preload | Apply spring support earlier in the travel. | Excess preload can lift or stiffen the chassis. |
Tuning sequence#
- Set realistic chassis mass and center of mass first.
- Choose travel that reaches the ground at rest without starting fully compressed.
- Tune frequency for support, then damping for rebound control.
- Add anti-roll bars only after each wheel behaves well independently.
car.add_wheel(-0.8, 1.4, -0.2, {
suspension_min: 0.10,
suspension_max: 0.45,
suspension_preload: 0.03,
suspension_frequency: 1.8,
suspension_damping: 0.65,
suspension_direction: { x:0, y:0, z:-1 }
});