> For the complete documentation index, see [llms.txt](https://traps.runemarkstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://traps.runemarkstudio.com/traps/utility/autoconnect-joint.md).

# AutoConnect Joint

This script is useful when you have a skinned mesh with lots of bones that are parented to each other as a chain. Useful for long ropes and cables which use Physics simulation.

**Quickly Connecting Character Joints**

![](/files/-MW9_mPXaE-y2o-f3qTm)

First, add a *Character Joint* and a *Rigidbody* to all the bones of the rope armature. You can select all the bones in the Hierarchy and add the components to all of them at once. The script will take care of the connected bodies.&#x20;

![](/files/-MW9jlJmMK0NilqfFoH4)

Attach the script to the last bone, then click on the component menu, and choose Connect Joints Upward.

![](/files/-MW9_jH6XTV3aE1CwUtR)

The bones are now connected, and you no longer need this component. You can tweak the joint parameters, rigid bodies and colliders all at once.&#x20;

![The swinging trap uses character joints and physics simulation for the cable.](/files/-MW9cHyTloC8zUmBjEa1)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://traps.runemarkstudio.com/traps/utility/autoconnect-joint.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
