spawn_physics_constraint
Spawns a physics constraint actor in the Unreal editor, optionally wires two actors by name or label, and recomputes the joint frames.
Instructions
Spawns an APhysicsConstraintActor in the editor world at location (zero rotation) in an undo transaction and optionally sets the two actors it constrains, found by object name or label (first match), then recomputes the joint frames. A name that matches no actor is skipped, not an error: check actor1_wired and actor2_wired. Each call adds a new actor; the level is not saved. Tune it with set_constraint_limits and set_physics_constraint_drives, read it with get_physics_constraint_info; for joints inside a Physics Asset use add_physics_asset_constraint.
Returns: { actor_name: string, actor_internal_name: string, actor_class: string, constraint_component: string, actor1_wired: bool, actor2_wired: bool, constraint_actor1?: string, constraint_actor2?: string, spawned: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| location | No | World [x, y, z] for the constraint actor (defaults to origin) | |
| actor1_name | No | Optional name/label of the first actor to constrain | |
| actor2_name | No | Optional name/label of the second actor to constrain |