DecayKnowledgebase
functiongenerated

Physics.create_hinge_joint

Authors an enabled hinge on an existing owner with no authored 2D joint of any kind. Anchors are finite body-local Vec2 distances without transform scale. Angular limits and motor start disabled; set_hinge_motor can drive the new joint. 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 owners, references, identical endpoints, anchors or existing joints fail before mutation. Keeps other owner components and body motion; legacy connections remain separate.

Signature

Physics.create_hinge_joint(joint: Entity, first: Entity, second: Entity, first_anchor: Vec2, second_anchor: Vec2) -> unit

Member of Physics

Related types

Entity

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