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. Each of these five can be switched between hold and toggle per pawn (Toggle Crouch, Toggle Walk, Toggle Sprint, Toggle Aim, Toggle Strafe, in GASPALS > Input > Hold Toggle). Gamepad buttons are in Controls.
On the Mover pawn, crouch only toggles on the ground or while sliding. Pressing sprint while crouched stands up.
Gait¶
| Gait | When (Mover pawn) |
|---|---|
| Sprint | Sprint on, not aiming, and (while strafing) the input is within Sprint Max Angle from Facing of the facing direction. |
| Walk | Walk on, or a small stick deflection (with the default 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 in GetDesiredGait: Sprint when sprint is on, the stick counts as full input and (unless the character orients to movement) the input is within Sprint Max Angle from Facing of the facing; otherwise Walk when walk is on or the stick is not at full input; otherwise Run. What counts as full input:
DDCvar.AnalogInputStyle, when the project registers it, decides on both pawns: 0 treats any deflection as full (single gait), 1 compares the stick with Analog Walk/ Run Threshold (0.7) on the CMC pawn.- Without the console variable, the CMC pawn's Movement Stick Mode (Input) decides: the Single Gait modes treat any deflection as full, the two Walk / Run modes compare it with the threshold.
The owning client sends its full-input flag to the server when it changes, so the server and the other players pick the same gait (no corrections when the stick crosses the threshold, and other players see the right walk or run).
Sprint Max Angle from Facing (on the pawn, GASPALS > Movement > Sprint): the Mover pawn has one angle per DDCvar.StrafeStyle (60 / 95.7 / 95.7 degrees), the CMC pawn one value (50). Raise it to let the character sprint sideways while strafing.
Rotation mode¶
| Mode | When | The character faces |
|---|---|---|
| OrientToMovement | Default in third person | Where it moves |
| Strafe | Strafe toggled on, in first person, while auto-strafing, or near a targeted actor | The camera direction (the target when locked on) |
| Aim | Aim held | The aim direction |
The camera uses the same mode to pick its Free, Strafe or Aim rig.
Auto-strafe (GASPALS > Strafe on both pawns, off by default): with Auto Strafe Enabled, the character strafes while the player looks around and orients to movement again Auto Strafe Delay (1 s) after the look input stops. It works in third person on both pawns, and also in the top-down and side-scroller views on the Mover pawn. It only matters while strafe is toggled off; the CMC pawn starts strafing. On the CMC pawn the state is sent to the server with the rest of the input state, so other players see the same facing.
Target lock: actors that call AddTarget / RemoveTarget on the pawn (the /GASPALS/Levels/LevelPrototyping/TargetDummy does on overlap) can be locked on; the nearest one is marked with a red cone and the character keeps facing it, out of cover. Both pawns support it; the CMC pawn turns toward the target at Target Lock Interp Speed (GASPALS > Targeting, 10).
Speeds¶
Set on the Walking mode instance of the pawn's CharacterMover component: select the component in the pawn Blueprint, find Movement Modes in the Details panel and expand the Walking entry (category Blueprint Overrides (Change These)). The class defaults are on BP_MovementMode_Walking; a value changed on the pawn's instance wins over them.
| 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 Mover pawn's instance uses 0.1 for walk/run and idle) |
The Cover mode (a child of Walking) moves at 150 (walk) and 250 (run and sprint), with Gait Change Deceleration 1500.
Right after landing the Walking mode brakes with Just Landed Deceleration (20000) for Just Landed Duration (0.2 s), so the character doesn't slide (GASPALS > Movement > Landing). The Cover mode uses the same values. The Falling mode turns at most Falling Rotation Rate (300 degrees per second, GASPALS > Movement > Falling). It only matters while the pawn faces the camera (strafing, aiming or first person): without strafing, the Mover pawn keeps its take-off facing in the air by design, whatever the rate.
Set on the pawn (class defaults, category Movement). Each is a vector: forward, strafe, backward speed, blended by direction with Curve_StrafeSpeedMap while strafing. Walk Speeds Demo, Run Speeds Demo and Sprint Speeds Demo in the same category are not used.
| 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, so change them on the pawn (GASPALS > Movement > CMC), not on the component:
| Setting | Default |
|---|---|
| Gait Max Acceleration | 800, 800, 300 (walk, run, sprint at top speed) |
| Sprint Acceleration Speed Range | 300 to 700 (sprint acceleration eases from the run value to the sprint value over this speed range) |
| Gait Ground Friction | 5, 5, 3 |
| Sprint Ground Friction Speed Range | 0 to 500 |
| Braking Deceleration | 500 with movement input, 2000 when stopping (also in cover) |
| Stopping Braking Friction | 3 |
| Falling Rotation Rate | 200 degrees per second (the CMC pawn turns toward its input in the air, also without strafing) |
Mover movement modes¶
Registered on CharacterMover > Movement Modes of the Mover pawn:
| 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 | Physics ragdoll (X); see Ragdoll and interactions. |
The mode and transition classes are in /GASPALS/Blueprints/MovementModes. The pawn holds its own instance of every mode, so a value changed on that instance only affects that pawn, and a later change to the class default does not reach a value the instance overrides.
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_SuggestedMode | Global | Applies a mode requested in the input (ragdoll enter and exit). |
BP_MovementTransition_Cover | Global | Walking to Cover and back, from the cover input. |
BP_MovementTransition_ToSlide | Walking and Cover modes | Speed over Slide Enter Speed (380), crouching, not in cover, cooldown over. |
BP_MovementTransition_FromSlide | Sliding mode | Not crouching, or speed at or below Slide Exit Speed (200). Returns to Walking. |
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. Its settings are on the Sliding entry of the pawn's CharacterMover > Movement Modes (class defaults on BP_MovementMode_Slide; categories Blueprint Overrides (Change These) and GASPALS > Movement > Slide):
| Setting | Default |
|---|---|
| Initial Boost Time / Initial Boost Speed / Initial Boost 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 |
| Slide Enter Speed / Slide Exit Speed | 380 / 200 |
The slide starts when the speed is over Slide Enter Speed (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 (crouch again, sprint or jump) or slows to Slide Exit Speed (200). The transitions read both speeds from the Slide mode.
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 (0 turns the cooldown off). It is measured in Mover simulation time, so the server and the predicting client agree.
Slide on the CMC pawn¶
The CMC pawn slides the same way: sprint, then crouch. The Character Movement Component has no slide mode, so the pawn keeps walking crouched and overrides the movement settings while the slide lasts (crouched max speed from the boost or the slope, acceleration, braking deceleration from the slope, ground friction). The settings are on the pawn, GASPALS > Movement > Slide, with the Mover defaults:
| Setting | Default |
|---|---|
| Enable Slide | On |
| Slide Enter Speed / Slide Exit Speed / Slide Cooldown | 380 / 200 / 0.75 s |
| Slide Initial Boost Time / Speed / Acceleration, Slide After Boost Acceleration | 0.2 s / 800 / 2000, 300 |
| Slide Shallow Slope Angle / Slide Steep Slope Angle | 10 / 40 degrees |
| Slide Flat Ground Speed / Slide Shallow Slope Speed / Slide Steep Slope Speed | 100 / 500 / 800 |
| Slide Flat Ground Deceleration / Slide Steep Slope Deceleration | 500 / 2000 |
| Slide Ground Friction | 1 (how fast the slide turns toward the input; CMC only) |
The slide starts and ends as on the Mover pawn (not in cover or ragdoll, ends when the character stands up, leaves the ground or slows to Slide Exit Speed; with sprint held the character stands up at the end). The owning client decides and sends the slide state to the server when it changes, and the server applies it before the next move, so sliding gives no corrections. The Anim Blueprint gets the Sliding movement mode: motion matching searches Slide Databases (on SandboxCharacter_CMC_ABP, the Relaxed slide databases by default). The looping slide sound plays on every machine. The state machine locomotion setup (DDCvar.LocomotionSetupCMC 1) plays the slide too: its animation chooser (CHT_CMCCharacterAnimations) has Slide Transitions and Slide Loops rows with the Relaxed slide animations, as the Mover pawn's chooser.
Debug¶
p.VisualizeMovement 1shows the movement state.- Z (keyboard only) toggles a debug flying mode on both pawns (the CMC pawn uses the Character Movement's Flying mode; debug tools).