Utility Scripts · Physical Controls

Pull Handle

Pull Handle is a handle whose value increases as it extends outward from its mount.

ItemMeaning / default
initial_valueActual initial position in 0..1; defaults to 0.
GML
jolt_control_pull_handle(options=undefined)

Call jolt_start() before creation. Every factory accepts one optional options struct and returns JoltControl, or undefined on error. Common options: parent, position/rotation or local_position/local_rotation, mass, resistance and output. Dimensions are full lengths in metres, mass is in kg; this API uses degrees for angles. See Mounting, Size and Rendering for shared configuration.

ItemMeaning / default
size{x:0.3, y:0.15, z:0.15}
mass / travel1 kg / 0.5 m
auto_return / targetfalse / 0
drive{max_force:20, frequency:4, damping:1}
detents[]

The origin is the retracted handle centre. Unlike Slider, increasing values move along mounting +Z: 0 is retracted and 1 fully extended. It uses size and positive travel; it has no is_pressed(), cap_size or Button thresholds. Its geometry is one moving box, not a telescoping model.

target is a canonical value in 0..1. set_target() alone only stores the target; enable the drive with auto_return: true or set_auto_return(true). The body moves towards it physically; creation does not place the body at target.

Example#

GML
handle = jolt_control_pull_handle({
    travel: 0.25,
    auto_return: true,
    target: 0,
    drive: {max_force: 25, frequency: 4, damping: 1}
});
var extension = handle.get_value();

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
jolt_control_pull_handlejolt_control_pull_handle(options=undefined)Requires managed world, optional options, returns owning JoltControl or undefined. Without parent world position/rotation; with parent local_position/local_rotation, do not mix. Pull handle: size .3/.15/.15 m, mass1 kg, travel.5 m, target0, auto_return false.