Skip to content

Traversal reference

The traversal components (logic, its Mover and CMC adapters, and the ledge tracer) and the in-level tracer preview actor.

How to read these tables

Settings are the values you tune: select the component in your pawn Blueprint (or open the asset) and look in the Details panel under the category shown. Runtime state is written by the system while it runs; read it, do not set it. Functions marked pure have no execution pins. The descriptions are the same as the Details panel tooltips. Default is the class default; where a sample pawn sets a different value on its component, the description says so ().

AC_TraversalLogic

/GASPALS/Systems/TraversalSystem/AC_TraversalLogic · parent ActorComponent · implements BPI_TraversalSystem_C

Settings

Traversal > Check

Variable Type Default Description
Traversal Check Radius
TraversalCheckRadius
Float 30 Radius (cm) of the capsule traced forward to find a traversable obstacle. Read by the pawn's GetTraversalCheckInputs. Default 30.
Traversal Check Half Height
TraversalCheckHalfHeight
Vector2D (60, 86) Half height (cm) of the traced capsule. X = on the ground (60), Y = in the air (86).
Traversal Check Speed Range
TraversalCheckSpeedRange
Vector2D (0, 375) Ground speed range (cm/s) mapped onto TraversalCheckDistanceRange: faster characters look further ahead. Mover pawn (0, 375), CMC pawn (0, 500).
Traversal Check Distance Range
TraversalCheckDistanceRange
Vector2D (75, 300) Forward trace distance (cm) at the low and high end of TraversalCheckSpeedRange. Mover pawn (75, 300), CMC pawn (75, 350).
Traversal Check Air Distance
TraversalCheckAirDistance
Float 75 Forward trace distance (cm) while in the air. Default 75.
Traversal Check Air End Offset
TraversalCheckAirEndOffset
Vector (0, 0, 50) Offset added to the trace end while in the air (cm). Default (0, 0, 50).

Traversal > Collision

Variable Type Default Description
Traversable Trace Channel
TraversableTraceChannel
ETraceTypeQuery TraceTypeQuery3 Trace channel of the obstacle search (the first capsule trace in TryTraversalAction). Default Traversable: only geometry that blocks the Traversable channel can be vaulted, hurdled or mantled (the TraversalObjectPreset profile does). Pick your project's channel by name if its custom channels are numbered differently.
Room Check Trace Channel
RoomCheckTraceChannel
ETraceTypeQuery Visibility Trace channel of the three room checks in TryTraversalAction (room at the front ledge, across the top, and to land behind). Default Visibility: anything that blocks it stops the move.

Traversal > First Person

Variable Type Default Description
First Person Traversal Turn Speed
FirstPersonTraversalTurnSpeed
Float 2 First person: how fast (interp speed) the view turns toward the obstacle direction during a traversal. 0 leaves the view alone. Default 2.
First Person Traversal Turn Threshold
FirstPersonTraversalTurnThreshold
Float 15 First person: the view only turns when it is more than this many degrees off the obstacle direction. Default 15.

Traversal > General

Variable Type Default Description
Enable Traversal
bEnableTraversal
Boolean true Turns the traversal system on or off (read at start, default only). Off: no traversal checks or actions; jump is a plain jump.
Runtime state (2 variables)
Variable Type Default Description
Traversal Tracer
TraversalTracer
AC_TraversalTracer ref AC_TraversalTracer on the owning pawn, cached at BeginPlay; computes the ledges.
Doing Traversal Action
DoingTraversalAction
Boolean false True while a traversal montage plays; blocks cover and drives the first-person turn toward the ledge.

Functions

Function Inputs Outputs Description
IsDoingTraversalAction   bDoingTraversalAction (Boolean) True while a traversal action (vault, mantle, hurdle) plays. (BPI_TraversalSystem)
AdjustRotationFirstPerson DeltaTime (Float)   First person only: while a traversal plays, turns the control rotation toward the ledge direction when the view is more than 15 degrees off. Called every tick during the traversal.
ChooseTraversalMontage ChooserInput (S_CHT_TraversalMontages_IN), AnimInstance (AnimInstance ref) Montage (AnimMontage ref), ChooserOutput (S_CHT_TraversalMontages_OUT) Side hook: picks the traversal montage for the chooser input and the character's anim instance (pose history). AC_TraversalLogic_Mover evaluates CHT_TraversalMontages_Mover, AC_TraversalLogic_CMC evaluates CHT_TraversalMontages_CMC. The base has no chooser: it warns on screen and returns no montage, so TryTraversalAction reports MontageSelectionFailed.
PlayTraversalMontage Montage (AnimMontage ref), PlayRate (Float), StartTime (Float), Mesh (SkeletalMeshComponent ref)   Side hook: plays the chosen montage, then calls HandleTraversalMontageStarted once it starts and HandleTraversalMontageEnded when it completes, blends out or is interrupted. AC_TraversalLogic_Mover plays it through the Character Mover (PlayMontageOnMoverActor, root motion), AC_TraversalLogic_CMC on Mesh (Play Montage). The base plays nothing.
SetWarpTargets     Adds or updates the FrontLedge, BackLedge and BackFloor motion warping targets from TraversalResult, matching the montage warp windows.
In order for the actor to move to the exact points on the obstacle, we use a Motion Warping component which warps the montage’s root motion using notify states on the montage. This function updates the warp targets in the component using the ledge locations.
TryTraversalAction Inputs (S_TraversalCheckInputs), DebugType (EDrawDebugTrace) TraversalCheckFailed (Boolean), MontageSelectionFailed (Boolean) Checks for a traversable obstacle ahead (capsule trace, ledge tracer, room checks), asks the montage chooser for a matching traversal and plays it on this machine and on the server.
SetMovementMode NewMovementMode (EMovementMode)   Side hook: sets the movement mode for the traversal. AC_TraversalLogic_Mover queues the Mover mode by name (Flying, Falling, else Walking), AC_TraversalLogic_CMC sets it on the Character Movement Component. The base does nothing.
SetReplicationBehavior ClientAuthoritative (Boolean)   Side hook: while ClientAuthoritative (a traversal plays), the owner's movement trusts the client so the warped montage is not corrected. AC_TraversalLogic_CMC sets bServerAcceptClientAuthoritativePosition and bIgnoreClientMovementErrorChecksAndCorrection on the Character Movement Component. The base and AC_TraversalLogic_Mover do nothing.
IsCameraInFirstPerson (pure)   bFirstPerson (Boolean) True when the owner's camera reports the FirstPerson view (BPI_CameraSystem).

Events

  • PerformTraversalAction: custom event.
  • PerformTraversalAction_Server (TraversalResult (S_TraversalCheckResult)): Server RPC, reliable.
  • PerformTraversalAction_Clients (TraversalResult (S_TraversalCheckResult)): Multicast RPC.
  • HandleTraversalMontageStarted: custom event.
  • HandleTraversalMontageEnded: custom event.

AC_TraversalLogic_Mover

/GASPALS/Systems/TraversalSystem/AC_TraversalLogic_Mover · parent AC_TraversalLogic_C

Functions

Function Inputs Outputs Description
ChooseTraversalMontage ChooserInput (S_CHT_TraversalMontages_IN), AnimInstance (AnimInstance ref) Montage (AnimMontage ref), ChooserOutput (S_CHT_TraversalMontages_OUT)  

AC_TraversalLogic_CMC

/GASPALS/Systems/TraversalSystem/AC_TraversalLogic_CMC · parent AC_TraversalLogic_C

Functions

Function Inputs Outputs Description
ChooseTraversalMontage ChooserInput (S_CHT_TraversalMontages_IN), AnimInstance (AnimInstance ref) Montage (AnimMontage ref), ChooserOutput (S_CHT_TraversalMontages_OUT)  

AC_TraversalTracer

/GASPALS/Systems/TraversalSystem/AC_TraversalTracer · parent ActorComponent

Settings

Traversal > Debug

Variable Type Default Description
Persistent Show Trace Boolean false Keep the ledge line traces and ledge markers on screen (debug).
Show Trace Boolean false Draw the ledge line traces for a short time (debug).

Traversal > Tracer

Variable Type Default Description
Min Ledge Width Float 70 Narrowest ledge (cm) that counts as traversable; corner traces probe half this width to each side.
Max Ledge Sideways Depth Float 70 Maximum sideways depth (cm) of a ledge. Not read by the current tracing graphs.
Trace Complex Boolean true Use complex (per-triangle) collision for the ledge line traces.
Min Front Ledge Depth Float 37.5226 Depth (cm) of the width-check line traced into the obstacle behind the hit point.
Respect Players Facing Dir
RespectPlayersFacingDir
Boolean false Whether ledge detection should favor the player facing direction. Not read by the current tracing graphs.

Functions

Function Inputs Outputs Description
ComputeLedgeData HitResult (HitResult), PlayerDirection (Vector) Found Front Ledge (Boolean), Start Ledge Location (Vector), Start Ledge Normal (Vector), FoundBackLedge (Boolean), End Ledge Location (Vector), End Ledge Normal (Vector) Finds the front and back ledges of the obstacle hit by the initial trace: nudges the point inward, finds the corners, checks the width, then traces up and across to the ledge edges. Returns found flags, locations and normals.
NudgeTraceTowardsObjectOrigin HitResult (HitResult)   Moves the hit location 1 cm toward the object origin along the surface so later traces start on the surface.
In the event that our initial hit is on the edge of the object, subsequent traces could fail. So here we make sure that our initial trace is 1 unit closer, location wise to the origin of the object
Set Trace Hit Point HitResult (HitResult), New Impact Point (Vector)   Overwrites only the location of a hit result.
TraceAlongHitPlane Hit (HitResult), TraceLenght (Float), TraceDirection (Vector) OutHit (HitResult), ReturnValue (Boolean) Line trace along the hit surface plane in TraceDirection from the hit point; returns the hit and whether it hit.
Cross product the surface normal and the up vector of the hit component, to get a vector pointing to the right, but aligned with the rotation of the object
Cross product against the surface normal once again to get a vector pointing up, but along the surface
Having a trace lenght of twice the radius means we cant have a trace which is too short, so long as our start is inside the sphere bounds
We subtract the impact normal, to push our starting point, 1 unit into the plane we've hit, that way, this trace can hit exactly the edge of the surface above our hit
TraceCorners Hit (HitResult), TraceDirection (Vector), TraceLenght (Float) OfsettedCornerPoint (Vector), CloseToCorner (Boolean), DistanceToCorner (Float) Finds the corner of the obstacle in TraceDirection: returns the hit point pulled back by half MinLedgeWidth, whether the corner is closer than that, and its distance.
TraceWidth Hit (HitResult), Direction (Vector) ReturnValue (Boolean) Line trace across the obstacle top, offset by half MinLedgeWidth, to check the ledge is wide enough. Returns whether it hit.
TryAndCalculateLedges InitialHitResult (HitResult), TraversalCheckStuct (S_TraversalCheckResult)   Entry point: computes the ledges for an initial hit using the owner forward vector and writes them into the traversal check result.
Call this function to evaluate whether or not a single primitive can be traversed.

BPI_TraversalSystem

/GASPALS/Systems/TraversalSystem/BPI_TraversalSystem · parent Interface

What other systems ask the traversal system.

Functions

Function Inputs Outputs Description
IsDoingTraversalAction   bDoingTraversalAction (Boolean) True while a traversal action (vault, mantle, hurdle) plays.

BP_TraversalTester

/GASPALS/Systems/TraversalSystem/BP_TraversalTester · parent Actor

Settings

Variable Type Default Description
Initial Trace Distance
InitialTraceDistance
Float 600 Length (cm) of the capsule sweep forward from the tester that finds the obstacle to check.