Blender Physical Controls

Knob

Limited rotation around Z, zero marker +Y. Positive rotation moves the marker toward Blender local +X and runtime local −X through the mirror-X conversion.

JoltPhysics Asset Editor 0.31.1 · verified against project sources on 27 September 2026.

Blender setup#

Available since addon 0.18.0; supported by 0.31.1. Add this type under Physical Controls, assign its Key and keep scale 1.

Field / operationMeaning and validation
Geometry and pivotA solid cylinder centred on the mounting point; Radius and full Depth.
MotionLimited rotation around Z, zero marker +Y. Positive rotation moves the marker toward Blender local +X and runtime local −X through the mirror-X conversion.
Initial state and readingInitial Angle lies inside the limits. get_value() is 0 at Min Angle and 1 at Max Angle. Default limits are −80° to +80°.
Limits and capabilitiesLimits must contain zero and span less than 180°. This control is limited; use Hand Wheel for continuous rotation. Scalar detents use normalized values, not degrees.
JSON v3size:{radius,depth}, min_angle, max_angle, initial_angle

Create from the asset#

The following example assumes loaded asset data, a live machine_body and an authored knob named control_main. Geometry overrides are optional; omit settings to use Blender defaults.

GML
var settings = jolt_asset_control_settings();
settings.set_radius(0.25);
settings.set_depth(0.12);
settings.set_min_angle(-70);
settings.set_max_angle(80);
settings.set_initial_angle(20);
control = jolt_asset_create_control(asset, "control_main", machine_body, settings);
if (is_undefined(control)) show_debug_message(jolt_get_error_message());
// Step, after the physics update:
if (!is_undefined(control) && control.is_valid()) {
    var value = control.get_value();
}

Live behavior#

Live set_auto_return, set_target, set_resistance, set_detents and set_locked adjust supported behavior. Auto Return takes priority over detents. Output mapping and inversion are runtime choices. These operations do not rebuild geometry or replace the original construction pose.

Simulation, rendering and lifetime#

Use the existing jolt_update() loop, then read the control's physical state. Drive your visual model with control.get_transform() or the existing control rendering API. The asset helper creates the same JoltControl bodies and constraints as the direct factory; it does not render your model or assign gameplay actions. Each creation is independent.

control.destroy() removes the mechanism and preserves its parent. Parent destruction and jolt_stop() clean up attached controls. Use managed lifecycle calls. No additional native bridge change is required by the Blender controls integration; use the matching current GML loader and jolt_asset_controls scripts.