> 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/the-modules/ragdoll-module.md).

# Ragdoll Module

Physics-driven collapse on death, with presets and a bone builder.

## Inspector reference

### Ragdoll Setup

| Field                | Type | Default | What it does                                                                          |
| -------------------- | ---- | ------- | ------------------------------------------------------------------------------------- |
| **Ragdoll Enabled**  | bool | `true`  | Master toggle. *(Shown only when no ragdoll exists yet, alongside the Setup button.)* |
| **Show Debug Bones** | bool | `false` | Draws every ragdoll collider in the Scene view. *(Shown once a ragdoll exists.)*      |

### Settings

| Field                               | Type  | Default | What it does                                                            |
| ----------------------------------- | ----- | ------- | ----------------------------------------------------------------------- |
| **Disable By Default**              | bool  | `true`  | Keep the ragdoll asleep until triggered.                                |
| **Time To Stand Back**              | float | `3.0`   | Delay before the character stands up after a ragdoll.                   |
| **Invert Hips Detection Direction** | bool  | `false` | Flip the get-up facing detection if the character stands the wrong way. |
| **Time To Reset Bones**             | float | `1.0`   | How long bone-blend back to animation takes.                            |

### Physics Settings

| Field                              | Type        | Default     | What it does                                                          |
| ---------------------------------- | ----------- | ----------- | --------------------------------------------------------------------- |
| **Horizontal Velocity Multiplier** | float `0-2` | `1`         | Scales inherited horizontal velocity on activation.                   |
| **Vertical Velocity Multiplier**   | float `0-2` | `0.5`       | Scales inherited vertical velocity on activation.                     |
| **Ragdoll Preset**                 | enum        | `Realistic` | `Realistic`, `HeavyImpact`, `Stiff`, `Arcade`, `Floaty`, or `Custom`. |

### Custom Ragdoll Physics *(shown when Preset = Custom)*

| Field                   | Range   | Default | What it does                         |
| ----------------------- | ------- | ------- | ------------------------------------ |
| **Custom Linear Drag**  | `0-2`   | `0.05`  | Air resistance on movement.          |
| **Custom Angular Drag** | `0-2`   | `0.5`   | Resistance on spin.                  |
| **Custom Bounciness**   | `0-1`   | `0.25`  | How much the body bounces on impact. |
| **Custom Friction**     | `0-1`   | `0.4`   | Surface grip.                        |
| **Custom Joint Spring** | `0-200` | `50`    | Joint stiffness.                     |
| **Custom Joint Damper** | `0-50`  | `5`     | Joint damping.                       |

### Collider Tuner

| Field                       | Type | Default | What it does                              |
| --------------------------- | ---- | ------- | ----------------------------------------- |
| **Use Symmetrical Editing** | bool | `true`  | Applies limb edits to both sides at once. |

### Quick Symmetrical Adjustments *(shown when Symmetrical Editing = on)*

Real-time radius/height for each limb pair — edits push straight onto the live colliders:

| Field                         | Range                   | Default         |
| ----------------------------- | ----------------------- | --------------- |
| **Upper Arm Radius / Height** | `0.01-0.3` / `0.01-1.0` | `0.08` / `0.25` |
| **Lower Arm Radius / Height** | `0.01-0.3` / `0.01-1.0` | `0.06` / `0.23` |
| **Upper Leg Radius / Height** | `0.01-0.3` / `0.01-1.0` | `0.12` / `0.4`  |
| **Lower Leg Radius / Height** | `0.01-0.3` / `0.01-1.0` | `0.08` / `0.38` |
| **Hand Radius**               | `0.01-0.3`              | `0.05`          |
| **Foot Radius**               | `0.01-0.3`              | `0.06`          |

{% hint style="info" %}
For the full build-and-tune walkthrough — including fixing a ragdoll that won't stand right — see Setting Up a Ragdoll.
{% endhint %}

***

The **Ragdoll module** turns the character's animated skeleton over to physics — on death, on a hard fall, or on demand. It lives on the Core and can build the entire ragdoll from the humanoid bone map for you.

This page is the reference; for the hands-on build-and-tune walkthrough (including fixing a ragdoll that won't stand right), see Setting Up a Ragdoll.

### Building and rebuilding

```csharp
core.ragdoll.HasRagdoll;          // is one set up?
core.ragdoll.OpenRagdollEditor(); // launch the bone builder
core.ragdoll.RemoveRagdoll();     // strip it back out
core.ragdoll.RefreshColliders();  // push edited sizes onto live colliders
```

### Presets

Rather than hand-tuning physics materials and joints, pick a **preset** — `Realistic`, `HeavyImpact`, `Stiff`, `Arcade`, `Floaty`, or `Custom`. Each sets drag, bounce, friction, and joint spring/damper as a coherent package. `Custom` exposes every value individually.

### Triggering a ragdoll

```csharp
core.ragdoll.TriggerRagdoll(force, hitPoint);              // generic knock-down
core.ragdoll.TriggerFallRagdoll(impactForce, preVelocity); // hard-landing collapse
```

Both call `EnableRagdoll()` under the hood, which snapshots the animated pose, swaps kinematic control for physics, and applies your chosen material and joint settings. `DisableRagdoll()` and `StandingUpBehaviour()` handle getting back up when `disableByDefault` and `_timeToStandBack` allow it.

{% hint style="warning" %}
**Death sequencing gotcha:** calling `EnableRagdoll()` twice during a death can overwrite the saved camera target. The module guards against this, but if you're triggering ragdoll from your own death logic, make sure you only enable it once per death.
{% endhint %}

### Debugging

Turn on `showDebugBones` to draw every ragdoll collider in the Scene view — indispensable when a body lands wrong. With `useSymmetricalEditing` on, editing one side's limb dimensions mirrors to the other.


---

# 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/the-modules/ragdoll-module.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.
