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#
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#
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#
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.
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 / owner | Signature | Operation contract |
|---|---|---|
| jolt_asset_control_settings | jolt_asset_control_settings() | Returns empty JoltAssetControlSettings without physics allocation. |
| JoltAssetControlSettings.set_arm_length | JoltAssetControlSettings.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_size | JoltAssetControlSettings.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_return | JoltAssetControlSettings.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_damping | JoltAssetControlSettings.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_depth | JoltAssetControlSettings.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_detents | JoltAssetControlSettings.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_frequency | JoltAssetControlSettings.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_length | JoltAssetControlSettings.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_radius | JoltAssetControlSettings.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_angle | JoltAssetControlSettings.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_value | JoltAssetControlSettings.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_length | JoltAssetControlSettings.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_mass | JoltAssetControlSettings.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_angle | JoltAssetControlSettings.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_force | JoltAssetControlSettings.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_torque | JoltAssetControlSettings.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_angle | JoltAssetControlSettings.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_detents | JoltAssetControlSettings.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_position | JoltAssetControlSettings.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_threshold | JoltAssetControlSettings.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_radius | JoltAssetControlSettings.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_threshold | JoltAssetControlSettings.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_resistance | JoltAssetControlSettings.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_rotation | JoltAssetControlSettings.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_euler | JoltAssetControlSettings.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_size | JoltAssetControlSettings.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_target | JoltAssetControlSettings.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_travel | JoltAssetControlSettings.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_angle | JoltAssetControlSettings.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. |