Skip to main content

manage_physics_joints

Auto-generated from the Python tool registry. Do not hand-edit outside <!-- examples:start --><!-- examples:end --> blocks — the generator (tools/generate_docs_reference.py) will overwrite them.

Group: physics  ·  Module: services.registry.capability_adapter

Maturity: stable (support status; independent of enabled state, readiness and permissions).

Description​

Add, configure or remove 2D/3D joints.

Parameters​

NameTypeRequiredDescription
actionLiteral['add_joint', 'configure_joint', 'remove_joint']yesFeature action to perform.
dimensionstr | None—Physics dimension: '3d' (default) or '2d'.
targetstr | None—Target GameObject name or instance ID.
search_methodstr | None—Search method for target resolution.
joint_typestr | None—Joint type: fixed, hinge, spring, character, configurable (3D); distance, fixed, friction, hinge, relative, slider, spring, target, wheel (2D).
connected_bodystr | None—Connected body target for joints.
motordict[str, Any] | None—Motor config: {targetVelocity, force, freeSpin}.
limitsdict[str, Any] | None—Limits config: {min, max, bounciness}.
springdict[str, Any] | None—Spring config: {spring, damper, targetPosition}.
drivedict[str, Any] | None—Drive config for ConfigurableJoint.
propertiesdict[str, Any] | None—Direct property dict for joints or materials.
component_indexint | None—Zero-based index to select which component when multiple of the same type exist (e.g., multiple HingeJoints or BoxColliders). If omitted, targets the first instance.
unity_instancestr | int | None—Target Unity instance for this call: Name@hash or hash prefix; an integer selects only that exact port over stdio and is rejected over HTTP. Read mcpforunity://instances for available targets. Omit to use the legacy active selection or the sole available instance.

Returns​

A dict containing the Unity response. The exact shape depends on the action.

Examples​

Add a 3D hinge to Door in a test scene and connect it to the Rigidbody on Door Frame. Use unique names for existing bodies and inspect the resulting joint before saving.

MCP arguments
{
"action": "add_joint",
"dimension": "3d",
"target": "Door",
"joint_type": "hinge",
"connected_body": "Door Frame",
"search_method": "by_name"
}