Movement
Movement answers one question every tick: given where the unit is and where its route leads, how far does it travel and which way does it face? The question has three owners.
- An ability says where to go. Move To is the node that asks.
- Navigation plans the route (see Navigation and Level Data).
- A movement mode answers the per-tick question. The framework’s harness applies the answer and guards it: it keeps the unit off blocked ground, on the terrain and from turning faster than it can.
This split is why the Soldier and the Truck in the demo differ by a single class on a component. The Soldier uses Basic Movement. The Truck uses a Blueprint mode that steers like a bicycle. Both ride the same harness.
The components
Section titled “The components”A mobile unit carries two components.
Sein Movement holds how the unit moves:
| Setting | Default | Meaning |
|---|---|---|
| Movement Class | empty | The movement mode. Empty uses Basic Movement |
| Speed | 500 | Top speed in world units (centimeters) per second, before terrain and avoidance |
| Turn Rate | 5 | The fastest the unit can change facing, in radians per second |
| Mode Data | Per-unit tuning for the chosen mode. Its type follows Movement Class | |
| Avoidance Weight | 0 | Right of way for avoidance classes that weigh it. Basic Avoidance does not |
Sein Navigation holds how the unit finds and ends a route: Acceptance Radius, Fallback Footprint Radius, repath rules and more. See Navigation and Level Data.
Speed is not a hard cap on every mode. A mode with an acceleration ramp treats Speed as its top speed. Effects and upgrades modify Speed directly, and the mode sees the modified value.
What happens each tick
Section titled “What happens each tick”The movement system runs once per simulation tick, in this order:
- Route upkeep. Units with a new order ask navigation for a route. A unit standing on ground it cannot occupy, such as a spot a new blocker now covers, is moved to the nearest valid cell first. A unit with a route checks it, and plans again when it must.
- Snapshot. The system records every mover’s position, velocity and heading so each unit can read the others without seeing a half-updated tick. Avoidance prepares from it.
- Step. Each unit’s mode runs. The harness advances the unit past the waypoints it has reached. On the final leg, inside the arrival radius, the unit has arrived. Otherwise the mode’s Compute Motion runs and the harness applies the result:
- The unit moves by the motion’s velocity, but never past the waypoint it is heading for in one tick.
- The move goes through one check against blocked ground. If the full step is blocked, the unit tries sliding along one axis, and otherwise stays put. A step longer than the unit’s footprint is checked in footprint-sized hops, so a fast unit cannot jump a thin wall.
- The unit snaps to the ground height, plus the mode’s altitude for a flyer.
- It turns toward the motion’s target yaw by at most Turn Rate times the tick length, then tilts to the slope (up to 20 degrees).
- Contacts. Collision pushes overlapping bodies apart. See Collision and Extents.
- Completion. Arrival is decided from the post-contact position, so a unit shoved off its destination does not count as having arrived.
A mode only fills in step 3’s question. It never moves the unit directly, so a custom mode cannot walk through a wall or skip a turn limit.
An idle unit takes an idle step instead. The default stands still and turns toward its Face Point, if an ability set one, or else toward its formation slot’s facing. A settled idle unit sleeps and costs nothing until an order, a contact or a teleport wakes it.
Basic Movement
Section titled “Basic Movement”Basic Movement is the mode a unit gets when Movement Class is empty. It:
- heads for the current waypoint at Speed times the terrain speed multiplier, with no acceleration ramp,
- lets avoidance adjust the direction,
- limits its speed on the final leg so it stops inside the acceptance radius instead of overshooting,
- faces its direction of travel, turning at Turn Rate while it keeps moving,
- tilts to the slope.
This suits infantry. A vehicle that cannot turn on the spot needs its own mode: see Add the Truck for a short one and Write a custom movement mode for a longer one.
Move To
Section titled “Move To”Abilities start movement with Move To (see Add Movement). It asks the unit’s mode to travel to a destination and reports how it went:
| Output | When it fires |
|---|---|
| On Completed | The unit has arrived |
| On Failed | The move cannot finish. The result carries a reason |
| On Waypoint Reached | The unit passes a waypoint. The result carries its index and the route length |
| On Cancelled | Another order or Stop Movement replaced it |
| On Path Recomputed | The route was replanned mid-move. The move continues |
A failure reason is one of No Navigation (no navigation system is set), Stranded, Mode Failed (the mode gave up), No Movement Component, Entity Destroyed, Cancelled or Invalid Execution Context (Move To was called outside the simulation). A destination the unit cannot reach does not fail the move at once. The unit keeps trying, and Stranded fires later. To refuse such orders up front, turn on Requires Pathable Target on the ability (see Abilities).
Move To also takes a Persistence:
| Persistence | After arrival |
|---|---|
| Settle On Arrival | The request ends. A unit shoved afterwards stays where it lands |
| Hold Destination | The request stays active. If something pushes the unit outside its acceptance radius, it walks back |
| Retain Exact Destination | As Hold Destination, but the unit must reach and hold the exact point |
Stop Movement cancels the unit’s move and nothing else. Face Point turns a standing unit toward a world point, ahead of its formation facing, until it next moves. An attack uses it to face its target.
Stranded and replans
Section titled “Stranded and replans”A move that makes no progress toward its next waypoint is not abandoned at once:
- After Replan After No Progress (1 second by default) it asks navigation for a new route.
- After Stranded After No Progress (10 seconds by default) the move fails as Stranded.
Progress restarts both clocks. A unit that waits on purpose, because its avoidance said to give way, pauses them. Both are properties of the movement mode, so a mode with long legitimate pauses can raise them.
Compute Motion and the mover handle
Section titled “Compute Motion and the mover handle”Compute Motion is the event a Blueprint mode overrides. It receives a Mover handle and returns a Sein Motion:
| Field | Meaning |
|---|---|
| Velocity | The planar velocity this tick. Height is ignored |
| Target Yaw | The facing to turn toward, in radians |
| Update Facing | Turn toward Target Yaw. Off holds the current facing |
| Hold | The unit is waiting on purpose. Its progress clocks pause |
The handle reads the unit and its surroundings. Its nodes fall into groups:
| Group | Nodes |
|---|---|
| The unit | Get Location, Get Rotation, Get Yaw, Get Velocity, Get Speed, Get Turn Rate, Get Footprint Radius, Get Delta Time, Get Terrain Speed Multiplier, Get Acceptance Radius |
| The route | Get Destination, Get Distance To Destination, Get Waypoint Count, Get Current Waypoint Index, Get Waypoint, Get Current Waypoint, Get Segment Count, Get Segment |
| Other movers | Get Nearby Movers, Resolve Avoidance |
| Navigation | Nav Raycast, Sample Ground Height, Get Terrain Type At, Get Terrain Tag At, Is Position Clear, Query Nav Direction |
| Math | Step Speed Toward, Get Arrival Speed Cap, Shortest Angle Delta, Smooth Angle Toward, Get Look Ahead Point |
| Presentation | Set Render Value |
Get Speed already includes the terrain multiplier. The handle is valid only inside the hook that received it, so never store it in a variable.
The Truck uses Get Look Ahead Point to pick a target a fixed distance down the route, so it steers smoothly through corners instead of aiming at the next waypoint. See the mover handle reference for every node.
Other hooks on a mode:
| Hook | Purpose |
|---|---|
| Compute Idle Motion | What the unit does with no move: drift, coast to a stop, hover |
| Plan Path | Builds the route. The default asks navigation, or draws a straight line for a mode that bypasses pathfinding |
| On Move Begin / On Move End | Reset per-move state. Both run serially |
| Get Altitude | How high above the ground the unit rides |
The traits on the mode’s Class Defaults are Bypass Pathfinding (fly straight over obstacles), Snaps To Ground (follow terrain height and slope), Ticks While Idle, and the two timers above. Modes whose step hooks are all marked Thread Safe run in parallel across worker threads, and the others run one after another. Results are identical. Write a custom movement mode covers the rules.
Avoidance
Section titled “Avoidance”Avoidance keeps moving units from walking into each other. It is a service: a mode asks for it by calling Resolve Avoidance with the velocity it wants, and gets back the velocity to drive. A mode that never asks gets no avoidance.
Basic Avoidance, the default, works like this:
- It considers the nearest 8 friendly bodies the unit would collide with, within the two radii plus half a second of travel.
- It spaces the unit from them and steers around any that block its path, choosing a side and keeping it until the body is behind.
- Groups heading toward each other sidestep as groups, not one unit at a time.
- Its steering fades as the unit nears its destination, so units can still settle into tight slots.
Only friendly bodies are avoided: the unit’s own player and players that present each other as friendly. Other bodies stop it by collision. A body is only avoided if it has a collider, and only if the two would block each other, so give units Collision Enabled on their Sein Extents.
Pick the class with Project Settings > Plugins > SeinARTS > Movement > Avoidance Class. None turns avoidance off, and collision alone keeps bodies apart. The built-in avoidance never asks a unit to hold. A custom class can, for right of way.
Flyers and other bodies that bypass ground navigation are not avoided.
Arrival
Section titled “Arrival”A unit has arrived when it is on the final leg and inside its Acceptance Radius from the destination. The radius comes from the unit’s Sein Navigation component (50 by default). A larger value lets a vehicle that cannot turn tightly settle sooner. A smaller one lands infantry closer to its slot.
A destination held with Retain Exact Destination is stricter. The unit must reach it to within 5 units, and the final step must be clear.
Movement Data’s Arrival Imminent turns on during the final leg within the acceptance radius plus the unit’s body radius of the destination. Animation uses it to blend into the stop.
Turn rate
Section titled “Turn rate”Turn Rate is the most the unit’s facing can change per second, whatever the mode asks for. A mode asks for a yaw, and the harness turns toward it by at most Turn Rate times the tick length. At the default of 5 radians per second, a unit turns about 286 degrees per second.
A Turn Rate of 0 means the unit never turns. It slides along its route in whatever direction it faced when it set off.
An idle unit turns at its Turn Rate to its Face Point or, with Settle To Formation Facing on (see Orders and Formations), to the facing of the formation slot it stands in.
Animation state
Section titled “Animation state”Presentation reads movement without writing it. One node covers an animation Blueprint:
Get Animation Movement State takes the owning actor and returns a struct shaped like the character movement values an animation Blueprint expects:
| Field | Meaning |
|---|---|
| Velocity | World-space velocity |
| Speed | Signed forward speed. Negative when reversing |
| Ground Speed | Planar speed, always positive |
| Direction | Angle from facing to velocity in degrees, for strafe blends |
| Is Moving | Speed above 1 unit per second |
| Is Reversing | Driving backwards |
| Is Airborne | More than 1 unit above the ground |
| Arrival Imminent | Final approach |
| Has Movement Input | A move is active. It turns false the moment the move ends, before velocity reaches zero |
Single-field nodes (Is Moving, Get Ground Speed and the rest) exist for graphs that need one value. A mode can pass its own values to presentation with Set Render Value, and presentation reads them with Get Movement Render Value. They are not simulation state and are not saved.
The Soldier’s animation Blueprint in Create the Soldier reads Ground Speed and Direction.
Example: crossing mud
Section titled “Example: crossing mud”A Soldier has Speed 350 and Acceptance Radius 50. It crosses 700 units of open ground, then 700 units of mud, then stops.
- On open ground the terrain multiplier is 1. It covers 700 units in 2 seconds.
- On mud with a Speed Multiplier of 0.5 it moves at 175 units per second, so the same distance takes 4 seconds.
- Near the end, the final leg’s speed limit shortens its last steps, and it stops just inside the 50-unit acceptance radius, not on the exact point.
If a wall blocked it and nothing cleared it, the move would replan after 1 second and fail as Stranded after 10, and the ability’s On Failed would fire. Terrain types are covered in Navigation and Level Data.
Common mistakes
Section titled “Common mistakes”- Speed in the wrong unit. Speed is centimeters per second. A walking infantryman is around 350, not 3.5.
- Turn Rate left at 0. The unit never faces its direction of travel.
- A destination nobody can reach. The unit tries for 10 seconds and then fails as Stranded. Turn on Requires Pathable Target to reject the order instead.
- No Collision Enabled. Avoidance sees only bodies with colliders, and contacts push apart only colliders. Units without collision on their Sein Extents are neither avoided nor pushed apart, so they overlap.
- Mode Data from a different class. Mode Data follows Movement Class. Change the class and the data changes type. Set it again.
- A mode that is not Thread Safe. It works, but its units step one after another. The compile warning names the hook.
- Using floats in a mode. A custom mode runs in the simulation. Use fixed-point nodes. Data validation flags the rest.
Related
Section titled “Related”- Add Movement and Add the Truck for movement in the demo
- Write a custom movement mode
- Navigation and Level Data for routes, acceptance and terrain
- Collision and Extents for contacts and footprints
- Orders and Formations for where destinations come from
- Movement reference, Sein Movement, Movement settings