Appearance
MotionWalkComponent
MotionWalkComponent handles base walking state, movement speed, and direction analysis. It is the foundation that the other Motion movement components react to.
Requirements
- The
ACharacterowner must have a validUCharacterMovementComponent. - Motion must find a
UAbilitySystemComponenton the character or owning actor. The PlayerState usually owns this component. - You must initialize the Gameplay Ability System for the character and ASC pair.
- You must configure
GE_Motion_WalkSpeedfor server-applied walk speed changes. - You must configure
GE_Motion_Walkingfor the walking state tag. - You must configure the
Motion.State.WalkingGameplayTag.
MotionPlayerState is not necessary. For setup steps, see How to add Motion to a character.
Behavior
Each update, the component analyzes velocity, updates movement direction, applies configured directional speed multipliers, manages GAS effects, and sends camera/event notifications when state changes.
Walking is active while the character is grounded and platform-relative speed is at least WalkSettings.MinWalkVelocity in the profile. The default is 50.0. Direction data gives forward, backward, and strafing state to animation, camera, audio, and gameplay logic.
The profile-authored BaseWalkSpeed has a default of 600.0. During initialization, Motion applies it to CharacterMovementComponent->MaxWalkSpeed. When the ASC has a WalkSpeed attribute, the server writes the same attribute base value. Then, it synchronizes CMC with the active WalkSpeed value.
Walking state must use GAS. Without a resolvable ASC, the component can copy BaseWalkSpeed to the standard CMC. It can also continue direction updates, speed queries, and speed events. It does not supply the walking tag, walking-state delegate, walking camera state, or server-applied speed effects.
When the Walk Component is active, do not use the CharacterMovementComponent walk speed setting as a separate base speed. Motion owns MaxWalkSpeed, and later GAS speed effects build from the Motion value.
A custom CharacterMovementComponent subclass is not necessary for this ownership model. Motion updates the standard CMC and GAS state directly.
Public API
Walking state and movement queries
IsCurrentlyWalking() -> bool: Returns true when the actor hasMotion.State.Walking.GetMovementDirection() -> FMotionMovementDirection: returns current movement direction.GetCurrentMovementSpeed() -> float: returns current movement speed.GetMovementSpeedPercentage() -> float: returns speed as a normalized percentage.IsMovingForward() -> bool: Returns true when movement is forward.IsMovingBackward() -> bool: Returns true when movement is backward.IsStrafing() -> bool: Returns true when movement is sideways.GetDirectionalSpeedMultiplier() -> float: returns the current movement-direction multiplier.
Profile setup
GetProfile() -> UMotionWalkProfile*: returns the assigned walk profile.SetProfile(UMotionWalkProfile* NewProfile) -> void: assigns a setup-time profile before BeginPlay.HasValidProfile() -> bool: Returns true when the assigned profile is valid.
Authority-only speed effects
ApplyWalkSpeedModification() -> void: applies the walk speed effect. This is server-only.RemoveWalkSpeedModification() -> void: removes the walk speed effect. This is server-only.
Protected/Internal Behavior
The component owns the tick-time workflow that analyzes movement, applies server-owned walking tags and directional speed effects, and broadcasts local camera events. These hooks are protected implementation details, not the public Blueprint API:
InitializeWalkComponent() -> voidOnAbilitySystemComponentReady() -> voidSyncBaseWalkSpeed() -> voidUpdateWalkingState(float DeltaTime) -> voidUpdateMovementDirection(float DeltaTime) -> voidUpdateMovementSpeed(float DeltaTime) -> voidApplyDirectionalSpeedMultipliers(float DeltaTime) -> voidStartWalkCameraEffects() -> voidStopWalkCameraEffects() -> void
Configuration
Configuration is in the assigned MotionWalkProfile. The default Motion profile for this release is /MotionCore/Motion/Profiles/v2_0_0/DA_MotionWalkProfile_Default_v2_0_0.
To change walking behavior, duplicate the Motion-owned walk profile into project content. Edit the duplicate. Then, assign it to the Profile property of the component. See Component profiles.
Profile fields
BaseWalkSpeed: base movement speed copied to CMC and, on authority, theWalkSpeedattribute base. Default:600.0.WalkSettings.MinWalkVelocity: grounded speed threshold for the walking state. Default:50.0.WalkSettings.ForwardSpeedMultiplier: forward directional speed multiplier. Default:1.0.WalkSettings.BackwardSpeedMultiplier: backward directional speed multiplier. Default:0.7.WalkSettings.StrafeSpeedMultiplier: strafe directional speed multiplier. Default:0.8.WalkSettings.bEnableDirectionalSpeedMultipliers: enables directional speed effects. Default:true.WalkCameraEffect: camera curve used for walking feedback.WalkSpeedEffect: GameplayEffect used for walk speed modification.WalkingTagEffect: GameplayEffect that grantsMotion.State.Walking.
The primary setting that you edit is the Profile reference. Runtime and diagnostic state stays on the component.
Runtime State
During play, the component stores CurrentMovementDirection, active effect handles, and prediction flags. It also stores the last reported movement speed and camera curve identifiers. Use the public query functions for gameplay and animation logic. Do not read or change these fields directly.
Blueprint Events
OnWalkingStateChangedDelegate(bool bIsWalking): fires when walking state changes.OnMovementDirectionChangedDelegate(FMotionMovementDirection NewDirection): fires when movement direction changes.OnMovementSpeedChangedDelegate(float NewSpeed, float SpeedPercentage): fires on the locally controlled character when movement speed changes.
Networking
Authority applies and removes the walking tag and walk-speed GameplayEffect. GAS replicates those effects, while each instance computes movement direction and speed from its local movement state. Walking camera effects run only for the locally controlled character.