# BP\_WalkingComponent

This page describes the Walking Component that ships with Motion. The Walking Component provides camera movement for basic player movement and configurable walking acceleration.

### Dependencies

* requires BP\_JumpingComponent.
* requires BP\_SprintingComponent.
* requires BP\_CrouchingComponent.

### Methods

#### Event Handler

| Name                   | Description                                                                                |
| ---------------------- | ------------------------------------------------------------------------------------------ |
| HandleOnCurveMaximum   | Called when the component's active curve reaches its peak.                                 |
| HandleOnEventBeginPlay | Called when "Event Begin Play" gets called. Sets up events and saves component references. |
| HandleOnEventTick      | Core logic handling. See detailed comments.                                                |
| HandleOnPlayerLanded   | Called when the player lands.                                                              |
| HandleOnVelocityBegin  | Called when player starts moving.                                                          |
| HandleOnVelocityStop   | Called when player stops moving.                                                           |

#### Manipulators

| Name                         | Description                                                                                                |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------- |
| LerpTorwardsWalkingSpeed     | Applies the current walking speed, relative to curve progression.                                          |
| ResetWalkAccelerationSeconds | Resets walk acceleration, e.g. after stopping to walk                                                      |
| UpdateDeltaSeconds           | Updates progress on sprint shake camera curve, timer for holding the key down & penalty timer if penalized |

#### Debug

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

***

### Variables

#### Configuration

| Name                         | Description                                                                                                     |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------- |
| PostLandingAccelerationCurve | The curve vector used to accelerate when landing.                                                               |
| WalkAccelerationCurve        | The curve vector used to accelerate when walking.                                                               |
| WalkShakeCurve               | The curve vector used to move the camera when walking.                                                          |
| bUseLandingAcceleration      | If true, uses LandingAccelerationCurve instead of WalkAccelerationCurve when landing.                           |
| bUseWalkAcceleration         | If true, uses WalkAccelerationCurve to accelerate the player instead of instantly setting the BaseMaxWalkSpeed. |
| bShowDebugInformation        | If ticked, various useful variables will be printed on the screen to help with debugging                        |
| bIsEnabled                   | If unticked, 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                                             |
| ----------------------- | ------------------------------------------------------- |
| ActiveAccelerationCurve | The currently used acceleration curve.                  |
| CurrentTargetRotation   | The current requested camera offset for this compoenent |

#### States

| Name                   | Description                      |
| ---------------------- | -------------------------------- |
| bHasLandedWithOverride | If true, the player is sprinting |
| bIsWalking             | If true, the player is sprinting |

#### Default

| Name               | Description                       |
| ------------------ | --------------------------------- |
| JumpingComponent   | Reference to the sprint component |
| SprintingComponent | Reference to the sprint component |
| CrouchComponent    | Reference to the crouch component |


---

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