> 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/player-abilities.md).

# Player Abilities

Dodge, inventory, emotes, and teleport — the player-facing extras.

These four modules live on the **Controller** — they're things a *player* does. On a pure-AI character they simply don't run. Each has its own inspector tab.

## Dodge

### Inspector reference

| Field                     | Type  | Default | What it does                                                                                        |
| ------------------------- | ----- | ------- | --------------------------------------------------------------------------------------------------- |
| **Dodge Type**            | enum  | `All`   | Which dodges are enabled — `Roll`, `Slide`, `Dynamic`, or `All`. Controls which cards below appear. |
| **Roll Force**            | float | `5`     | Base roll impulse.                                                                                  |
| **Max Roll Force**        | float | `9`     | Hard cap on total roll force regardless of incoming speed.                                          |
| **Roll Duration**         | float | `1.4`   | How long the roll lasts.                                                                            |
| **Roll Cooldown**         | float | `0.8`   | Time before rolling again.                                                                          |
| **Roll Custom Z Offset**  | float | `0.2`   | Collider Z-offset held during the roll animation.                                                   |
| **Slide Force**           | float | `9`     | Base slide impulse.                                                                                 |
| **Slide Duration**        | float | `1.07`  | How long the slide lasts.                                                                           |
| **Slide Cooldown**        | float | `2`     | Time before sliding again.                                                                          |
| **Slide Custom Z Offset** | float | `0.08`  | Collider Z-offset held during the slide.                                                            |

Triggered from the `wasRollPressed` / `dynamicDodgeTriggered` input flags, so it stays device-agnostic.

## Inventory

### Inspector reference

| Field                    | Type    | Default      | What it does                                            |
| ------------------------ | ------- | ------------ | ------------------------------------------------------- |
| **Max Slots**            | int     | `20`         | Inventory capacity.                                     |
| **Starting Money**       | int     | `0`          | Money the character starts with.                        |
| **Empty Hands Trigger**  | string  | `EmptyHands` | Animator trigger played when returning to bare hands.   |
| **Scroll Threshold**     | float   | `0.05`       | Mouse-scroll magnitude needed to change slot.           |
| **Use Key**              | KeyCode | `E`          | Use equipped item.                                      |
| **Drop Key**             | KeyCode | `G`          | Drop equipped item.                                     |
| **Use Equip Animations** | bool    | `true`       | If off, items snap to hand instantly with no animation. |
| **Debug Log**            | bool    | `false`      | Verbose inventory logging.                              |

```csharp
controller.inventory.AddItem(item);
controller.inventory.RemoveItem(item);
controller.inventory.HasItem("Torch");
controller.inventory.AddMoney(50);
controller.inventory.SpendMoney(20);
controller.inventory.HasEnoughMoney(20);
```

The controller's `HasEquippedItem` reads from here, which is how aiming can be gated to "only when something's equipped."

## Emotes

### Inspector reference

**Emote List** — a list of emote entries, each with:

| Field                    | Type   | What it does                                  |
| ------------------------ | ------ | --------------------------------------------- |
| **Emote Name**           | string | Label shown on the UI.                        |
| **Animation State Name** | string | Exact Animator state to play.                 |
| **Is Looping**           | bool   | Loops until you move (dances) vs. plays once. |
| **Cross Fade Time**      | float  | Blend time into the emote.                    |

**Settings**

| Field                        | Type   | Default      | What it does                                                   |
| ---------------------------- | ------ | ------------ | -------------------------------------------------------------- |
| **Lock Movement**            | bool   | `true`       | Freeze movement while emoting.                                 |
| **Lock Camera**              | bool   | `false`      | Freeze camera while emoting.                                   |
| **Cancel On Move Input**     | bool   | `true`       | WASD cancels the emote.                                        |
| **Input Grace Period**       | float  | `0.3`        | Ignore input briefly after starting (prevents instant cancel). |
| **Default Locomotion State** | string | `Locomotion` | Animator state to return to when the emote stops.              |

```csharp
controller.emotes.PlayEmoteByIndex(2);
controller.emotes.IsEmoting; // true while an emote plays
```

## Teleport

### Inspector reference

| Field               | Type       | Default    | What it does                          |
| ------------------- | ---------- | ---------- | ------------------------------------- |
| **Enable Blink**    | bool       | `true`     | Toggle the blink/teleport ability.    |
| **Blink Distance**  | float      | `10`       | How far forward the blink travels.    |
| **Blink Cooldown**  | float      | `2.0`      | Time between blinks.                  |
| **Obstacle Layers** | LayerMask  | Everything | Walls that block/clip the teleport.   |
| **Start VFX**       | GameObject | —          | Prefab spawned at the start position. |
| **End VFX**         | GameObject | —          | Prefab spawned at the destination.    |

For scripted teleports (checkpoints, doors, cutscenes) call it directly:

```csharp
controller.teleport.TeleportTo(targetPosition, targetRotation);
```


---

# 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/player-abilities.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.
