Appearance
MotionWalkComponent
The Walk Component handles base movement speed and direction analysis. It serves as the foundation for all movement components.
Requirements
- Character with
UCharacterMovementComponent(by default it should have one) - MotionPlayerState configured in GameMode
- Gameplay Ability System (GAS) initialized
- Gameplay Effects:
GE_Motion_WalkSpeed- Modifies walk speed attributeGE_Motion_Walking- Grants walking state tag
- Gameplay Tags:
Motion.State.Walking- Active when character is walkingAttribute.Movement.WalkSpeed- Movement speed attribute tag
Installation
- Add
UMotionWalkComponentto your Character Blueprint or C++ class - Configure the component properties in the Details panel
- Set the
WalkingTagEffecttoGE_Motion_Walking - Set the
WalkSpeedEffecttoGE_Motion_WalkSpeed - Configure
BaseWalkSpeedto match your AttributeSet default (typically 600) - Enable
bApplyCameraEffectsif you want subtle camera movement during walking


Functionality
Main Update Flow
Expandability
The MotionWalkComponent provides numerous virtual functions for customization:
Core Walking Functions
| Function | Parameters | Returns | Use Case Examples |
|---|---|---|---|
IsCurrentlyWalking() | None | bool | • Add terrain restrictions • Check stamina requirements |
GetDirectionalSpeedMultiplier() | None | float | • Combat stance modifiers • Encumbrance system |
UpdateWalkingState() | float DeltaTime | void | • Custom state transitions • Add walking conditions |
Movement Analysis Functions
| Function | Parameters | Returns | Use Case Examples |
|---|---|---|---|
CalculateMovementDirection() | None | FMotionMovementDirection | • 8-way movement • Analog stick deadzone |
UpdateMovementDirection() | float DeltaTime | void | • Smooth direction changes • Add turn lag |
UpdateMovementSpeed() | float DeltaTime | void | • Acceleration curves • Speed ramping |
HasMovementDirectionChanged() | NewDir, OldDir | bool | • Adjust sensitivity • Filter small changes |
Movement Query Functions
| Function | Parameters | Returns | Use Case Examples |
|---|---|---|---|
GetMovementDirection() | None | FMotionMovementDirection | • Get current direction analysis • Animation blending |
GetCurrentMovementSpeed() | None | float | • Speed-based audio pitch • UI speed display |
GetMovementSpeedPercentage() | None | float | • Stamina drain calculation • Animation playback rate |
IsMovingForward() | None | bool | • Enable forward-only actions • Camera adjustments |
IsMovingBackward() | None | bool | • Backward animation selection • Combat stance logic |
IsStrafing() | None | bool | • Strafe animation triggers • Lean system input |
Speed Modification Functions
| Function | Parameters | Returns | Use Case Examples |
|---|---|---|---|
ApplyDirectionalSpeedMultipliers() | float DeltaTime | void | • Surface-based speed • Weather effects |
ApplyWalkSpeedModification() | None | void | • Buff/debuff system • Equipment bonuses Server-only (BlueprintAuthorityOnly) |
RemoveWalkSpeedModification() | None | void | • Clear status effects • Reset to base speed Server-only (BlueprintAuthorityOnly) |
Camera Effect Functions
| Function | Parameters | Returns | Use Case Examples |
|---|---|---|---|
StartWalkCameraEffects() | None | void | • Custom camera shake • View bobbing intensity |
StopWalkCameraEffects() | None | void | • Smooth camera reset • Transition effects |
GenerateCurveIdentifier() | None | FName | • Unique effect IDs • Multi-component support |
Utility Functions
| Function | Parameters | Returns | Use Case Examples |
|---|---|---|---|
InitializeWalkComponent() | None | void | • Custom initialization • Additional caching |
PrintDebugInformation() | None | void | • Custom debug display • Performance metrics |
Blueprint Events
| Event | Parameters | Use Case Examples |
|---|---|---|
OnWalkingStateChanged | bool bIsWalking | • Footstep sounds • Animation triggers |
OnMovementDirectionChanged | FMotionMovementDirection NewDirection | • Turn animations • Lean adjustments |
OnMovementSpeedChanged | float NewSpeed, float SpeedPercentage | • UI speed indicator • Sound pitch variation |
Configuration
Walking Settings (FMotionWalkSettings)
| Property | Type | Default | Description | Range |
|---|---|---|---|---|
| MinWalkVelocity | float | 50.0 | Minimum velocity to be considered "walking" | 1.0 - 200.0 |
| ForwardSpeedMultiplier | float | 1.0 | Walking speed multiplier for forward movement | 0.1 - 2.0 |
| BackwardSpeedMultiplier | float | 0.7 | Walking speed multiplier for backward movement | 0.1 - 2.0 |
| StrafeSpeedMultiplier | float | 0.8 | Walking speed multiplier for strafing movement | 0.1 - 2.0 |
| bEnableDirectionalSpeedMultipliers | bool | true | Whether to apply directional speed multipliers | - |
Core Configuration
| Property | Type | Default | Description | Range |
|---|---|---|---|---|
| BaseWalkSpeed | float | 600.0 | Base walk speed used for all multiplier calculations | 100.0 - 2000.0 |
| bApplyCameraEffects | bool | true | Whether to apply camera effects during walking | - |
| WalkCameraEffect | FMotionCurve | - | Camera curve to apply during walking (subtle camera movement) | - |
GAS Integration
| Property | Type | Description |
|---|---|---|
| WalkSpeedEffect | TSubclassOf<UGameplayEffect> | Gameplay effect to apply for walk speed modification |
| WalkingTagEffect | TSubclassOf<UGameplayEffect> | Gameplay effect that grants the Motion.State.Walking tag |
Debug
| Property | Type | Default | Description |
|---|---|---|---|
| bShowDebugInformation | bool | false | Debug information display |
State Tracking (Read-Only)
| Property | Type | Description |
|---|---|---|
| CurrentMovementDirection | FMotionMovementDirection | Current movement direction data |
| WalkCameraEffectIdentifier | FName | Unique identifier for walk camera effect |
Networking
The MotionWalkComponent handles networking through:
- Client-side prediction for immediate response
- Server validation for authoritative state
- GAS replication for synchronized effects
- Local-only camera effects for responsiveness without network overhead