‹›
Vehicles

Rendering Wheels

Uses native wheel world transforms to draw caller-owned models while the physical wheels remain virtual.

The wrapper never renders vehicle geometry. get_wheel_transform() returns the position and quaternion produced by steering, suspension travel and wheel rotation.

Expected model axes#

Local model axisMeaning
XWheel axle/right axis.
YWheel forward direction.
ZWheel up direction.

Reading transforms#

GML
for (var i = 0; i < car.get_wheel_count(); ++i) {
    var transform = car.get_wheel_transform(i);
    if (!is_undefined(transform)) {
        // Submit your model at transform.position with transform.rotation.
        draw_wheel_model(wheel_model, transform.position, transform.rotation);
    }
}

Quaternion and Euler#

  • wheel.rotation is the authoritative quaternion and avoids Euler discontinuities.
  • wheel.rotation_euler is convenient for GameMaker drawing helpers but has normal Euler ambiguity and gimbal-lock limitations.
  • wheel.rotation_angle is only the rolling angle, not the complete world orientation.
  • Do not reconstruct suspension and steering transforms manually when the native snapshot is available.

Current project integrations#

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.get_wheel_transformJoltVehicle.get_wheel_transform(index)World {position, rotation} with an XYZW quaternion or undefined; get_wheel(index).transform.