Skip to content

Movement

This page covers how the pawns move: gaits and rotation modes (both pawns), the Mover movement modes and transitions, and the slide. The animation side is in Animation pipeline.

Input state

Both pawns keep an input state (S_PlayerInputState): WantsToSprint (hold Shift), WantsToWalk (toggle Ctrl), WantsToStrafe (toggle middle mouse), WantsToAim (hold Right Button), WantsToCrouch (toggle C). Movement, animation and camera are derived from it.

Gait

Gait When (Mover pawn)
Sprint Sprint held, not aiming, and (while strafing) the input points forward enough.
Walk Walk toggled on, or a small stick deflection (DDCvar.AnalogInputStyle 1: below 0.7).
Run Otherwise.

In cover the gait is Walk (unless crouched), and during a cover run it is Sprint. The CMC pawn decides the same way (GetDesiredGait), with Movement Stick Mode and Analog Walk/Run Threshold (0.7) for the stick.

Rotation mode

Mode When The character faces
OrientToMovement Default in third person Where it moves
Strafe Strafe toggled on, in first person, or near a targeted actor The camera direction
Aim Aim held The aim direction

The camera uses the same mode to pick its Free, Strafe or Aim rig.

Speeds

Set on the Walking mode instance of each pawn's CharacterMover component (category Blueprint Overrides (Change These)):

Setting Default
Walk Speed / Walk Acceleration 165 / 500
Run Speed / Run Acceleration 375 / 800
Sprint Speed / Sprint Acceleration 585 / 300
Crouch Speed 165
Walk/Run Turn Strength / Sprint Turn Strength 8 / 4
Gait Change Deceleration / Stopping Deceleration 300 / 1000
Walk/Run Facing Time / Sprint Facing Time / Idle Facing Time 0.4 / 0.8 / 0.2 (the sample pawns use 0.1 for walk/run and idle)

The Cover mode (a child of Walking) moves at 150 (walk) and 250 (run and sprint).

Set on the pawn (class defaults). Each is a vector: forward, strafe, backward speed, blended by direction with Curve_StrafeSpeedMap while strafing.

Setting Forward, strafe, backward
Walk Speeds 200, 180, 150
Run Speeds 500, 350, 300
Sprint Speeds 700, 700, 700
Crouch Speeds 225, 200, 180

UpdateMovement_PreCMC writes the resulting max speed, acceleration, braking and friction into the Character Movement Component every frame, before it moves.

Mover movement modes

Registered on CharacterMover > Movement Modes of both Mover pawns:

Name Class Use
Walking BP_MovementMode_Walking (Smooth Walking) Ground movement with gait speeds, turning and facing.
Falling BP_MovementMode_Falling Air: air control 0.5.
Flying B_MovementMode_Flying Traversal moves, debug flying (max speed 1000).
Sliding BP_MovementMode_Slide Slide.
Cover BP_MovementMode_Cover Along cover (see Cover).
Traversing Flying (native) Registered but not used.
Ragdoll BP_MovementMode_Ragdoll Ragdoll pawn only.

Shared settings: legacy movement settings (max step height 30, perch radius 20) and stance settings (crouched half height 60). Sync Inputs For Sim Proxy is on, so remote characters receive the inputs for animation.

The pawn's Movement Mode Map translates mode names into the animation's movement modes (E_MovementMode): Cover counts as on ground, Sliding as sliding, and so on.

Transitions

Transition Where Condition
BP_MovementTransition_Cover Global Walking to Cover and back, from the cover input.
BP_MovementTransition_ToSlide Walking and Cover modes Speed over 380, crouching, not in cover, cooldown over.
BP_MovementTransition_FromSlide Sliding mode Not crouching, or speed 200 or lower.
BP_MovementTransition_SuggestedMode Global (ragdoll pawn) Applies a mode requested in the input (ragdoll enter and exit).

Transitions are instanced per mode: each mode carries its own copy.

Slide

Sprint, then crouch: the Mover pawn slides. BP_MovementMode_Slide is a smooth walking mode whose speed and deceleration depend on the slope:

Setting Default
Initial Boost Time / Speed / Acceleration 0.2 s / 800 / 2000
After Boost Acceleration 300
Steep Slope Angle / Shallow Slope Angle 40 / 10 degrees
Steep Slope Speed / Shallow Slope Speed / Flat Ground Speed 800 / 500 / 100
Steep Slope Deceleration / Flat Ground Deceleration 2000 / 500
Slide Cooldown 0.75 s

The slide starts when the speed is over 380 (running forward is about 375, so it needs a sprint), the character crouches, is not in cover, and the cooldown is over. It ends when the character stands up or slows to 200.

Slide Cooldown stops crouch-tapping from restarting the slide with a fresh boost: a new slide can start only 0.75 s after the last one started or ended. It is measured in Mover simulation time, so the server and the predicting client agree. It is set on the Slide mode instance of each pawn.

The CMC pawn has no slide.

Debug

  • p.VisualizeMovement 1 shows the movement state.
  • On the Mover pawns, Z (keyboard only) toggles a debug flying mode.