> For the complete documentation index, see [llms.txt](https://motion.docs.regensturm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://motion.docs.regensturm.com/components/bp_idlecomponent.md).

# 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.                |
