# Crouch Component

The Crouch Component provides smooth crouching and uncrouching for characters.

It also provides floor & ceiling detection to prevent the capsule from expanding too much when uncrouching, but still allowing for partial uncrouching if the ceiling height allows it. A speed penalty is applied when being crouched.

### Configuration

<table><thead><tr><th width="256">Variable</th><th>Description</th></tr></thead><tbody><tr><td>Is Input Toggle</td><td>If true, the input key is used as toggle. This is especially useful for use on gamepads where it is more tiring to hold down a button.</td></tr><tr><td>Target Crouch Camera Offset</td><td>Camera Offset to add when the player is crouching.</td></tr><tr><td>Crouch Speed</td><td>Speed that is added to the character when crouched. Should be a negative number to make the character slower.</td></tr><tr><td>Capsule Half Height When Crouching</td><td>Target capsule half height for crouching.</td></tr><tr><td>Do Crouch Speed</td><td>Speed multiplier used to calculate the height difference done in a frame when crouching. (Formula is CrouchSpeed * DeltaTime)</td></tr><tr><td>Do Uncrouch Speed</td><td>Speed multiplier used to calculate the height difference done in a frame when uncrouching. (Formula is CrouchSpeed * DeltaTime)</td></tr><tr><td>Overlap Actor Types</td><td>Actor Types that are used for collision detection when uncrouching.</td></tr><tr><td>Class Exception List For Overlap</td><td>Array of Actor classes that are being ignored in ceiling checks.</td></tr><tr><td><p></p><p>Show Debug Information</p></td><td>If true, various useful variables will be printed on the screen to help with debugging.</td></tr></tbody></table>


---

# Agent Instructions: 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:

```
GET https://docs.kia.dev/motion/core-components/crouch-component.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
