> For the complete documentation index, see [llms.txt](https://rigonix3d.gitbook.io/rigonix3d-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rigonix3d.gitbook.io/rigonix3d-docs/documentation/getting-started/setting-up-a-ragdoll.md).

# Setting Up a Ragdoll

Build a ragdoll, fix a slouching skeleton, and tune the colliders so it lands right.

When a Rigonix character dies, it hands control of its skeleton to the physics engine and collapses. That's the ragdoll. The **Ragdoll module** lives on the Core and can build the whole thing for you from the humanoid bone map.

### Building the ragdoll

If you used the Character Creator with **Generate Ragdoll System** ticked, you already have one. To build or rebuild it manually:

{% stepper %}
{% step %}

#### Open the Ragdoll tab

Select your character, open the inspector, and go to the **Ragdoll** tab on the Core. If no ragdoll exists yet, you'll see an info box: *"No Ragdoll detected. Click 'Setup' to create one."*
{% endstep %}

{% step %}

#### Launch the Ragdoll Builder

Click **Setup** to open the **Ragdoll Builder** window. It calls `AutoDetectBones()` immediately, walking your humanoid avatar to find the hips, spine, limbs, hands, and feet.
{% endstep %}

{% step %}

#### Review the detected bones

The window lists every bone it found and what collider it will get — capsules for limbs, a box for the pelvis and chest. If a slot is empty, your avatar is missing that bone mapping; fix it in the model's **Rig → Configure** view.
{% endstep %}

{% step %}

#### Create the ragdoll

Hit **Create Ragdoll**. It adds a Rigidbody, collider, and — where appropriate — a `CharacterJoint` to each bone, with continuous-dynamic collision detection so fast-moving limbs don't tunnel through the floor.
{% endstep %}
{% endstepper %}

### Choosing a ragdoll feel

The module ships with presets so you don't have to hand-tune physics materials and joints. Pick one from the **Preset** dropdown:

| Preset           | Feel                                                                      |
| ---------------- | ------------------------------------------------------------------------- |
| **Realistic**    | Low drag, bouncy, springy joints. Bodies slide and tumble naturally.      |
| **Heavy Impact** | High friction, minimal bounce. Drops like dead weight and stays put.      |
| **Stiff**        | High drag, rigid joints. Barely moves after landing — classic PS2 feel.   |
| **Arcade**       | Extreme bounce, wild joint springs. Bodies fly around like stunt dummies. |
| **Floaty**       | Low-gravity, slow settling. Good for sci-fi or underwater.                |
| **Custom**       | Use your own drag, bounce, friction, and joint spring/damper values.      |

When a preset is active the individual physics fields are driven for you. Switch to **Custom** to expose `customLinearDrag`, `customBounciness`, `customFriction`, `customJointSpring`, and the rest.

***

## Troubleshooting: the ragdoll isn't standing correctly

This is the single most common ragdoll problem, and it's almost always one of a handful of causes.

### The skeleton slumps, twists, or sinks into the floor

{% hint style="info" %}
A ragdoll is only ever as good as its colliders. If the body looks wrong at rest, look at the colliders *first* — not the joints.
{% endhint %}

**Colliders overlap at the joints.** If the upper-arm capsule pokes into the torso box, the physics solver spends every frame shoving them apart and the body writhes or drifts. Shrink the radius or shorten the capsules where they meet so neighbours *touch* but don't *intersect*.

**Colliders are too fat.** Auto-sizing estimates from bone length, but stylised or chunky models throw it off. A too-wide thigh capsule makes the legs splay and the hips hover. Turn on **Show Debug Bones** and trim each capsule's radius until it hugs the mesh.

**Colliders are too thin or too short.** The opposite problem — skinny capsules let limbs pass through each other and the ground, so the body knots up or sinks. Grow them until each limb has real volume.

### Adjusting the colliders

You don't need to reopen the builder to fix sizing. The Ragdoll tab exposes per-limb dimensions directly:

```
upperArmRadius / upperArmHeight
lowerArmRadius / lowerArmHeight
upperLegRadius / upperLegHeight
lowerLegRadius / lowerLegHeight
handRadius
footRadius
```

With **Symmetrical Editing** on (the default), editing the left side mirrors to the right automatically, so you tune half a body and get a whole one. After changing values, `RefreshColliders()` pushes them onto the live colliders.

{% hint style="success" %}
**A good tuning loop:** enable Show Debug Bones → enter Play mode → kill the character → watch how it lands → exit → nudge the offending capsule → repeat. Two or three passes usually nails it.
{% endhint %}

### Other things to check

* **Joint limits too loose** — if elbows and knees bend the wrong way, the character joints' swing/twist limits need tightening. Rebuild from the Builder, which sets sane defaults, rather than hand-editing every joint.
* **Mass wildly uneven** — a 20 kg hand attached to a 2 kg forearm will whip the arm around. Keep masses proportional to real body segments.
* **Wrong preset for the model** — an Arcade preset on a heavy character reads as broken, not bouncy. Try Heavy Impact or Stiff for grounded characters.


---

# 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://rigonix3d.gitbook.io/rigonix3d-docs/documentation/getting-started/setting-up-a-ragdoll.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.
