Pull Handle
Extension follows local +Z, unlike Slider's −Z. Rotate the mounting frame to choose the world travel direction.
JoltPhysics Asset Editor 0.31.1 · verified against project sources on 27 September 2026.
Blender setup#
Available since addon 0.21.0; supported by 0.31.1. Add this type under Physical Controls, assign its Key and keep scale 1.
| Field / operation | Meaning and validation |
|---|---|
| Geometry and pivot | Full Handle Size XYZ; mounting point at the retracted handle centre. Defaults: 0.3 × 0.15 × 0.15 m, mass 1 kg, Travel 0.5 m. No physical base or guide rod is generated. |
| Motion | Extension follows local +Z, unlike Slider's −Z. Rotate the mounting frame to choose the world travel direction. |
| Initial state and reading | get_value(): 0 retracted, 1 fully extended. Initial Value defaults 0; Auto Return defaults false and target 0. Default drive 20 N / 4 Hz / damping 1; resistance 0 N. |
| Limits and capabilities | Travel must be positive and Initial Value in 0..1. No Button thresholds or is_pressed(). get_detent() returns the captured detent index or −1. To retract, set target 0 and enable Auto Return. |
| JSON v3 | size:[x,y,z], travel, initial_value; type:"pull_handle" |
Create from the asset#
The following example assumes loaded asset data, a live machine_body and an authored pull_handle named control_main. Geometry overrides are optional; omit settings to use Blender defaults.
var settings = jolt_asset_control_settings();
settings.set_size(0.3, 0.15, 0.15);
settings.set_travel(0.6);
settings.set_initial_value(0.25);
settings.set_auto_return(false);
settings.set_max_force(30);
settings.set_detents([0, 1]);
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 pull_value = control.get_value();
var detent_index = control.get_detent();
}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.