Blender Physical Controls

Construction settings

Override Blender defaults before construction, then use live JoltControl setters.

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

Syntax#

Syntax
jolt_asset_control_settings();

Returns JoltAssetControlSettings, a construction builder with no physics allocation. Valid setters return the builder; invalid input returns false and preserves the previous setting. Inspect jolt_get_error(). Some cross-field and type checks are deferred to jolt_asset_create_control; a successful setter does not guarantee that the complete combination is valid.

All construction setters#

Field / operationMeaning and validation
JoltAssetControlSettings.set_position(x,y,z)Local mounting position in GameMaker coordinates.
JoltAssetControlSettings.set_rotation(quaternion)Finite nonzero {x,y,z,w} mounting quaternion; normalized by the setter.
JoltAssetControlSettings.set_rotation_euler(x,y,z)Local Euler rotation in degrees.
JoltAssetControlSettings.set_size(x,y,z)Full box dimensions: Button, Lever, Slider, Pedal, Pull Handle.
JoltAssetControlSettings.set_radius(value)Knob/Wheel/Joystick positive radius.
JoltAssetControlSettings.set_depth(value)Knob/Wheel full cylinder depth.
JoltAssetControlSettings.set_length(value)Joystick rod length.
JoltAssetControlSettings.set_mass(value)Positive moving-body mass.
JoltAssetControlSettings.set_travel(value)Positive stroke: Button, Slider, Pull Handle.
JoltAssetControlSettings.set_travel_angle(degrees)Pedal: strictly between 0 and 180°.
JoltAssetControlSettings.set_arm_length(value)Crank pivot-to-grip-axis distance.
JoltAssetControlSettings.set_arm_size(width,depth)Crank arm cross-section.
JoltAssetControlSettings.set_handle_radius(value)Crank grip radius.
JoltAssetControlSettings.set_handle_length(value)Crank grip length.
JoltAssetControlSettings.set_initial_value(value)Button/Slider/Pull Handle construction position, 0..1.
JoltAssetControlSettings.set_min_angle(value)Lever/Knob lower limit.
JoltAssetControlSettings.set_max_angle(value)Lever/Knob upper limit or Joystick tilt limit; final type validation happens on creation.
JoltAssetControlSettings.set_initial_angle(value)Lever/Knob initial angle within final limits.
JoltAssetControlSettings.set_auto_return(enabled)Boolean; supported bounded controls, not Wheel/Crank.
JoltAssetControlSettings.set_target(x,[y])Scalar 0..1 or Joystick X/Y inside unit disc.
JoltAssetControlSettings.set_max_force(value)Nonnegative drive force N for linear types.
JoltAssetControlSettings.set_max_torque(value)Nonnegative return torque N·m for bounded angular types.
JoltAssetControlSettings.set_frequency(value)Nonnegative return spring frequency Hz.
JoltAssetControlSettings.set_damping(value)Nonnegative return damping.
JoltAssetControlSettings.set_resistance(value)Nonnegative mechanical resistance N or N·m.
JoltAssetControlSettings.set_detents(array)Scalar values/records or Joystick X/Y records; validated for the type on creation.
JoltAssetControlSettings.set_periodic_detents(config_or_false)Wheel/Crank periodic detents or disable.
JoltAssetControlSettings.set_pressed_threshold(value)Button upper threshold, 0..1.
JoltAssetControlSettings.set_released_threshold(value)Button lower threshold, less than pressed threshold.

Override precedence#

Blender defaults → construction overrides → live runtime setters. Overrides never mutate the loaded asset. Plain options use position:[x,y,z] and rotation:[x,y,z,w], unlike body creation's position struct. Identity, Key, UUID and type cannot be overridden. Unknown or wrong-type fields fail before successful construction.

Partial drive, circular size and crank arm_size merge only supplied fields. Other fields replace their original value. Detent shorthand is expanded by the existing runtime validators. Geometry and initial pose apply at creation; changing a builder later does not rebuild an existing control.

Example#

GML
var settings = jolt_asset_control_settings();
settings.set_size(0.10, 0.10, 0.60);
settings.set_min_angle(-30);
settings.set_max_angle(45);
settings.set_initial_angle(15);
settings.set_max_torque(12);
var lever = jolt_asset_create_control(asset, "lift_lever", machine_body, settings);
if (is_undefined(lever)) show_debug_message(jolt_get_error_message());
else lever.set_resistance(0.2);

A plain struct is equivalent for selected overrides; it can change a return motor without repeating the rest of the exported configuration.

GML
var lever = jolt_asset_create_control(asset, "lift_lever", machine_body, {
    initial_angle:15, auto_return:true, drive:{max_torque:12}
});

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
jolt_asset_control_settingsjolt_asset_control_settings()Returns empty JoltAssetControlSettings without physics allocation.
JoltAssetControlSettings.set_arm_lengthJoltAssetControlSettings.set_arm_length(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive finite lengths in m; arm_size is width/depth.
JoltAssetControlSettings.set_arm_sizeJoltAssetControlSettings.set_arm_size(width,depth)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive finite lengths in m; arm_size is width/depth.
JoltAssetControlSettings.set_auto_returnJoltAssetControlSettings.set_auto_return(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Strict Boolean.
JoltAssetControlSettings.set_dampingJoltAssetControlSettings.set_damping(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Finite >=0: N / N·m / Hz / damping ratio according to method. Use the parameter appropriate to the control type.
JoltAssetControlSettings.set_depthJoltAssetControlSettings.set_depth(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive dimension in m for a circular control; cannot combine with box set_size.
JoltAssetControlSettings.set_detentsJoltAssetControlSettings.set_detents(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Stores an array without immediate full validation; at most 256 unique targets, capture>0, release>capture, positive effort/frequency and damping>=0 are checked at creation.
JoltAssetControlSettings.set_frequencyJoltAssetControlSettings.set_frequency(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Finite >=0: N / N·m / Hz / damping ratio according to method. Use the parameter appropriate to the control type.
JoltAssetControlSettings.set_handle_lengthJoltAssetControlSettings.set_handle_length(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive finite lengths in m; arm_size is width/depth.
JoltAssetControlSettings.set_handle_radiusJoltAssetControlSettings.set_handle_radius(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive finite lengths in m; arm_size is width/depth.
JoltAssetControlSettings.set_initial_angleJoltAssetControlSettings.set_initial_angle(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Degrees: initial -180..180, min -180..0, max 0..180. Combined range/initial position is validated at creation.
JoltAssetControlSettings.set_initial_valueJoltAssetControlSettings.set_initial_value(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. 0..1 initial normalized position.
JoltAssetControlSettings.set_lengthJoltAssetControlSettings.set_length(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive dimension in m for a circular control; cannot combine with box set_size.
JoltAssetControlSettings.set_massJoltAssetControlSettings.set_mass(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive finite mass in kg.
JoltAssetControlSettings.set_max_angleJoltAssetControlSettings.set_max_angle(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Degrees: initial -180..180, min -180..0, max 0..180. Combined range/initial position is validated at creation.
JoltAssetControlSettings.set_max_forceJoltAssetControlSettings.set_max_force(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Finite >=0: N / N·m / Hz / damping ratio according to method. Use the parameter appropriate to the control type.
JoltAssetControlSettings.set_max_torqueJoltAssetControlSettings.set_max_torque(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Finite >=0: N / N·m / Hz / damping ratio according to method. Use the parameter appropriate to the control type.
JoltAssetControlSettings.set_min_angleJoltAssetControlSettings.set_min_angle(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Degrees: initial -180..180, min -180..0, max 0..180. Combined range/initial position is validated at creation.
JoltAssetControlSettings.set_periodic_detentsJoltAssetControlSettings.set_periodic_detents(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Immediately validates periodic configuration: integer count 1..3600, step=360/count, capture<=step/2, release>capture and <min(step, 45), positive effort/frequency, damping>=0.
JoltAssetControlSettings.set_positionJoltAssetControlSettings.set_position(x,y,z)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Finite host-local XYZ in m.
JoltAssetControlSettings.set_pressed_thresholdJoltAssetControlSettings.set_pressed_threshold(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. 0..1; released must be less than pressed at creation.
JoltAssetControlSettings.set_radiusJoltAssetControlSettings.set_radius(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive dimension in m for a circular control; cannot combine with box set_size.
JoltAssetControlSettings.set_released_thresholdJoltAssetControlSettings.set_released_threshold(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. 0..1; released must be less than pressed at creation.
JoltAssetControlSettings.set_resistanceJoltAssetControlSettings.set_resistance(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Finite resistance >=0, linear control N, rotational N·m.
JoltAssetControlSettings.set_rotationJoltAssetControlSettings.set_rotation(q)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Normalizes a nonzero XYZW quaternion struct; Euler XYZ degrees converts to a quaternion.
JoltAssetControlSettings.set_rotation_eulerJoltAssetControlSettings.set_rotation_euler(x,y,z)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Normalizes a nonzero XYZW quaternion struct; Euler XYZ degrees converts to a quaternion.
JoltAssetControlSettings.set_sizeJoltAssetControlSettings.set_size(x,y,z)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive full XYZ dimensions in m.
JoltAssetControlSettings.set_targetJoltAssetControlSettings.set_target(x,y=undefined)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. One argument 0..1, or joystick XY inside the unit disc.
JoltAssetControlSettings.set_travelJoltAssetControlSettings.set_travel(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Positive finite lengths in m; arm_size is width/depth.
JoltAssetControlSettings.set_travel_angleJoltAssetControlSettings.set_travel_angle(v)Returns self on acceptance, false on error. Changes overrides for future creation only, not the asset or a live Control. Pedal angle in (0, 180) degrees.