DecayKnowledgebase
functiongenerated

Physics.create_slider_joint

Authors an enabled slider on an existing owner with no authored 2D joint of any kind. Finite Vec2 anchors use body-local world units without transform scale; axes must be finite unit Vec2 vectors. Bounds must be finite even when disabled; enabled lower distance cannot exceed upper distance. Motor starts disabled and set_slider_motor can configure it before synchronization. Scoped handles become stable IDs or local prefab paths; null leaves an endpoint unbound and inactive targets suspend until active. Requires physics, works before bodies are built and creates its constraint at next fixed synchronization. Invalid arguments or existing joints fail before mutation. Keeps other owner components and body motion; legacy connections remain separate.

Signature

Physics.create_slider_joint(joint: Entity, first: Entity, second: Entity, first_anchor: Vec2, second_anchor: Vec2, first_axis: Vec2, second_axis: Vec2, limits_enabled: bool, lower_distance: number, upper_distance: number) -> unit

Member of Physics

Related types

Entity

Source
docs/generated/decay-api.json
Schema
v1
Engine version
0.1.0
Source commit
909aca81368b