# BP\_IdleComponent

This page describes the Idle Component that ships with Motion. The Idle Component provides the option to play camera animations when the player has been idle for a configurable amount of time.

### Methods

#### Event Handler

| Name                   | Description                                                            |
| ---------------------- | ---------------------------------------------------------------------- |
| HandleOnCameraInput    | Called when the player moves.                                          |
| HandleOnCurveMaximum   | Called when the component's active curve reaches its peak.             |
| HandleOnEventBeginPlay | Called when "Event Begin Play" gets called. Sets up events.            |
| HandleOnEventTick      | Core logic handler. Updates the timer & checks if idle should kick in. |
| HandleOnMovementInput  | Called when the player stops moving..                                  |
| HandleOnPlayerJump     | Called when the player jumped.                                         |

#### Debug

| Name                  | Description                                                     |
| --------------------- | --------------------------------------------------------------- |
| PrintDebugInformation | Prints useful information on the screen. Helpful for debugging. |

#### Manipulators

| Name                | Description                                                                      |
| ------------------- | -------------------------------------------------------------------------------- |
| ResetIdleSeconds    | Resets the idle timer.                                                           |
| SetIdleCurve        | Selects a random curve from the configured list of curves.                       |
| StopIdleAnimation   | Removes the camera offset and resets states.                                     |
| UpdateDeltaSeconds  | Updates the idle timer.                                                          |
| ValidateIdleSeconds | Checks if the player was idle long enough and prevents multiple set curve calls. |

***

### Variables

#### Configuration

| Name                  | Description                                                                                                                           |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| IdleCurves            | A list of curves used for when the player goes idle. The component selects a random curve when the player goes idle out of this list. |
| bShowDebugInformation | If true, various useful variables will be printed on the screen to help with debugging.                                               |
| bIsEnabled            | If false, the component will only print debug data and not update any other values.                                                   |

#### Constants

| Name      | Description                                               |
| --------- | --------------------------------------------------------- |
| CurveType | Type Identifier for the curves created by this component. |

#### Component Data

| Name                    | Description                                                            |
| ----------------------- | ---------------------------------------------------------------------- |
| bHasIdleAnimationPlayed | If true, an idle animation has been played since the player went idle. |
| bIsIdle                 | If true, no input has been registered for longer than SecondsToIdle.   |
| ActiveCurve             | The currently active curve used for the idle animation.                |


---

# 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://motion.docs.regensturm.com/components/bp_idlecomponent.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.
