Sein Movement
Class · USeinMovement : UObject
#include "Movement/SeinMovement.h"
abstract: use a subclass · can be subclassed in Blueprint · deterministic: safe in simulation code
A movement mode: how one kind of unit moves. Each unit with Movement Data has its own persistent instance, chosen by Movement Class (empty uses Basic Movement); its properties are saved with the world, and Mode Data is copied onto its same-named properties.
The base class is a harness every mode shares. While a move is active, Tick advances the route, arrives, asks Compute Motion what the unit wants, and applies it: one nav-floor check, ground snap, a Turn Rate-limited turn, slope tilt and the driven velocity. While idle, Tick Idle does the same with Compute Idle Motion. Plan Path builds routes, On Move Begin and On Move End bracket each move, and Get Altitude lifts a flyer. The default hooks are Basic Movement. A C++ mode may override Tick or Tick Idle to drive the whole step.
Steps run in parallel when the mode is native, or when every hook it overrides that runs during a step (Compute Motion, Compute Idle Motion, Get Altitude) is marked Thread Safe; other Blueprint modes step serially after them. A step may write only its own unit, its Movement Data and the mode.
Events and overrides
Section titled “Events and overrides”On Move Begin
Section titled “On Move Begin”Overridable in Blueprint, with a native default
Runs once when the unit starts a move, before its first step: reset per-move state here. Runs serially, so it need not be Thread Safe.
void BP_OnMoveBegin(USeinMoverHandle* Mover);On Move End
Section titled “On Move End”Overridable in Blueprint, with a native default
Runs when the unit’s move completes, fails or is cancelled. Runs serially.
void BP_OnMoveEnd(USeinMoverHandle* Mover);Compute Motion
Section titled “Compute Motion”Overridable in Blueprint, with a native default
What the unit wants this tick while it follows its route: a velocity and a facing. The harness applies it. The default is Basic Movement: head for the current waypoint at Speed, as avoidance adjusts it (Resolve Avoidance), slow to stop at the destination, and face the way it travels; a Field segment is followed through Query Nav Direction. Runs inside the parallel step when the override is marked Thread Safe.
FSeinMotion ComputeMotion(USeinMoverHandle* Mover);Compute Idle Motion
Section titled “Compute Idle Motion”Overridable in Blueprint, with a native default
What the unit wants while it has no move: a velocity (a hover drift, a coast to a stop) and a facing. The default stands still and turns toward its Face Point when an ability set one, else to its formation slot’s facing (Settle To Formation Facing). There is no route while idle. Runs inside the parallel step when marked Thread Safe; a mode that must keep moving while idle also ticks Ticks While Idle.
FSeinMotion ComputeIdleMotion(USeinMoverHandle* Mover);Plan Path
Section titled “Plan Path”Overridable in Blueprint, with a native default
Builds the route to the destination when a move starts and on each replan. The default flies straight for a mode that Bypasses Pathfinding and asks the navigation otherwise. Override to shape the route with the Planner handle: Request Nav Path and refine it, or build one with Add Waypoint, the segment nodes and Finalize Path. The route must end exactly on the destination; a partial route is refused, and the move waits and plans again. Runs serially.
ESeinPathResult BP_PlanPath(USeinPlannerHandle* Planner) const;Get Altitude
Section titled “Get Altitude”Overridable in Blueprint, with a native default
How high above the ground the unit rides; 0 sits on it. Ground snap adds it to the terrain height. Runs inside the step, so mark it Thread Safe with the other hooks.
FFixedPoint BP_GetAltitude() const;Properties
Section titled “Properties”Bypass Pathfinding
Section titled “Bypass Pathfinding”bool bBypassPathfinding · default false
Editable in class defaults · Blueprint read-only
Fly straight over obstacles instead of routing around them: the route is a straight line, and the body counts as bypassing ground navigation. For flyers and hovercraft.
Snaps To Ground
Section titled “Snaps To Ground”bool bSnapsToGround · default true
Editable in class defaults · Blueprint read-only
Take height from walkable ground only, so the unit holds its height sliding past a wall, and tilt it to the slope. Off for flyers, which ride over the top of any cell.
Ticks While Idle
Section titled “Ticks While Idle”bool bTicksWhileIdle · default false
Editable in class defaults · Blueprint read-only
Keep running Compute Idle Motion while the unit stands still, as a hover bob does. Off, an idle unit sleeps once settled; orders, contacts and teleports wake it.
Replan After No Progress
Section titled “Replan After No Progress”FFixedPoint ReplanAfterNoProgress · default FFixedPoint::One · min 0.05
Editable in class defaults · Blueprint read-only
Seconds a move goes without progress before it plans its route again. Holding on purpose pauses this clock. Raise it for a unit whose long pauses are normal, as a vehicle waiting in traffic; default 1 second.
Stranded After No Progress
Section titled “Stranded After No Progress”FFixedPoint StrandedAfterNoProgress · default FFixedPoint::FromInt(10) · min 0.05
Editable in class defaults · Blueprint read-only
Seconds a move goes without progress before it fails as Stranded. Holding on purpose pauses this clock. Raise it for a unit with long legitimate pauses, as a weapon team tearing down; default 10 seconds.
Steps In Parallel
Section titled “Steps In Parallel”bool bStepsInParallel · default false
Read-only in Details
Set when the Blueprint compiles: every hook it overrides that runs during a step is marked Thread Safe, so the mode steps in parallel. Compile warnings name the hooks that are not.
Tuning Struct
Section titled “Tuning Struct”TObjectPtr<UScriptStruct> TuningStruct
Read-only in Details · Blueprint read-only
The struct holding this Blueprint mode’s tuning variables, generated by Generate Tuning Data Structure; it fills each unit’s Mode Data so values can be set per unit.
Network functions
Section titled “Network functions”Get Mode Data Struct
Section titled “Get Mode Data Struct”UScriptStruct* GetModeDataStruct() const;The struct this mode reads from Movement Data’s Mode Data. The editor reads it by reflection (hence the UFUNCTION) to restrict and fill the Mode Data picker when Movement Class changes. Returns Tuning Struct by default, so a Blueprint mode’s generated struct is its Mode Data; a C++ mode with its own tuning struct overrides it.
C++ members (28)
void Wake();bool NeedsRouteUpkeep() const;An active move, or a held destination to check after a push.bool CanStepInParallel() const;Native modes, and Blueprint modes certified at compile (Steps In Parallel), step in the driver’s parallel phase; other Blueprint modes step serially after it.void PrepareDispatch();Creates the handle hooks dispatch with. The driver calls it serially, before any parallel step.int64 RequestLocomotion(const FFixedVector& Destination, USeinWorldSubsystem& World, FSeinEntityHandle Self);void CancelLocomotion(int64 Revision, USeinWorldSubsystem& World, FSeinEntityHandle Self);void PrepareLocomotion(const FSeinMovementContext& Ctx, USeinNavigationSubsystem* NavigationSubsystem);void FinishLocomotion(const FSeinMovementContext& Ctx, const FFixedVector& Start, ESeinMovementStepResult Step);void OnMoveBegin(const FSeinMovementContext& Ctx);Copies Mode Data onto the mode and runs On Move Begin, once when a move commits its first route. Native overrides call Super.void OnMoveEnd(FSeinEntity& Entity);Runs On Move End with the unit alone bound: only its pose reads work.ESeinMovementStepResult Tick(const FSeinMovementContext& Ctx);One step of an active move: the harness described on the class. Returns what the step did; completion advances the move from it on the post-contact pose.void TickIdle(const FSeinMovementContext& Ctx);One idle step: the first ground snap, Compute Idle Motion through the nav floor, ground snap and slope tilt. A unit shoved by a contact settles where it lands.ESeinPathResult PlanPath(const FSeinPlanPathContext& Ctx, FSeinPath& OutPath) const;Runs Plan Path with a bound Planner handle.bool UpdateMoveProgress(const FSeinMovementContext& Ctx, ESeinMovementStepResult Step);Whether this tick moved the unit closer to finishing its move. A tick without progress counts toward Replan After No Progress and Stranded After No Progress; a tick with it restarts them. Runs once per tick on the post-contact pose, serially, so it may read other units, including ticks still waiting on a first route, when no step ran; a Holding step pauses the clock without asking. The default wants less distance to the current route waypoint: override it when a mode steers by something other than its route.FFixedPoint GetAltitude(const FSeinMovementPayload* MovementData) const;The unit’s cruise height above the ground, through Get Altitude unless a C++ mode overrides it.bool BypassPathfinding() const;Whether this mode flies straight over obstacles; C++ modes may decide per unit.static TArray<FName> GetStepHookNames();The hooks that run during a step and must be Thread Safe for the mode to step in parallel.FFixedVector ResolveAvoidance(const FSeinMovementContext& Ctx, const FFixedVector& PreferredVelocity, bool* bOutHold = nullptr) const;The velocity to drive after avoiding other movers, from the velocity this mode wants. Asks the match’s avoidance with this mode’s Speed and Turn Rate; returns Preferred Velocity unchanged when avoidance is off or outside a step, and zero when avoidance says hold.bool TryFinalizeAuthoritativeArrival(const FSeinMovementContext& Ctx);Places the body exactly on an authoritative or Exact destination once it is within twice the acceptance radius and the final step is clear. True for an ordinary destination.FFixedPoint GetEffectiveTurnRate(const FSeinMovementContext& Ctx) const;The unit’s Turn Rate.FFixedPoint GetArrivalRadius(const FSeinMovementContext& Ctx) const;How close counts as arrived: the acceptance radius, or 5 cm (within it) for an authoritative or Exact destination, which completion then requires exactly.static FFixedPoint KinematicArrivalSpeedCap(FFixedPoint Distance, FFixedPoint Deceleration);The fastest speed that still stops within Distance at Deceleration; very large without deceleration.static FFixedPoint StepSpeedToward(FFixedPoint Current, FFixedPoint Target, FFixedPoint Accel, FFixedPoint Decel, FFixedPoint Dt);Eases a scalar speed toward Target over Dt, accelerating while it grows and decelerating while it shrinks or reverses.void CacheFootprintFromContext(const FSeinMovementContext& Ctx);Caches the body’s footprint and navigation profile for the nav floor. Route commits call it.bool IsWithinAuthoritativeDeparture(const FFixedVector& Position, const USeinNavigation* Nav) const;Bounded coarse-grid exception while leaving an authored standing position.static FFixedPoint ResolveCollisionRadius(USeinWorldSubsystem* World, FSeinEntityHandle SelfHandle, const FSeinNavigationPayload* NavData);The body’s footprint radius: its Extents’ bounding radius (a box’s half diagonal), else the Navigation Data’s fallback footprint, else 0. Collision and pathfinding use the same radius.static FFixedPoint ResolveCollisionRadius(const FSeinExtentsPayload* Extents, const FSeinNavigationPayload* NavData);static bool IsGroundStepClear(const FFixedVector& From, const FFixedVector& To, USeinNavigation* Nav, const FSeinNavAgentProfile& Agent, FFixedPoint Radius, FFixedPoint MaxStepHeight, const FFixedVector* AuthoritativeDestination = nullptr, int32* RemainingProbes = nullptr, FSeinNavPointQueryCache* PointCache = nullptr, bool bCheckHeight = true);Whether a body of Radius can travel the straight step From → To: footprint clear and no height change beyond MaxStepHeight, without sliding.