Skip to content

Sein Planner Handle

Class · USeinPlannerHandle : UObject

#include "Movement/SeinPlannerHandle.h"

deterministic: safe in simulation code

The handle a movement mode’s Plan Path hook receives. Use it to read the start, destination and unit footprint, query the navigation, and build the route either by requesting a navigation path and refining it or by adding waypoints and segments yourself. It is valid only during the hook call; never store it.

True when this handle is driving a real plan request (it has a context and an output path).

bool IsValidPlanner() const;

Where the unit is starting from.

FFixedVector GetStartLocation() const;

Where the unit was ordered to go.

FFixedVector GetDestination() const;

How wide the unit is — the clearance its path needs to keep from walls.

FFixedPoint GetFootprintRadius() const;

Empties the path so you can build a fresh one.

void ClearPath();

Adds one point to the end of the path. Build a route by adding points in order from start to destination, then call Finalize Path.

void AddWaypoint(const FFixedVector& Waypoint);

Finishes a hand-built path so the unit can follow it. Call once after adding all waypoints. Set Is Partial if the path stops short of the destination: a move refuses a partial route and plans again, so the last waypoint must be the destination for the unit to go.

void FinalizePath(bool bIsPartial);

Appends a drivable ARC segment (a Dubins / Reeds-Shepp curve) to the path: it runs From -> To about Center with the given Radius and SIGNED Sweep (sign = handedness, magnitude = extent in radians); Reverse marks a segment driven backward (a Reeds-Shepp cusp). Also pushes the endpoints onto the waypoint backbone so the path stays coherent for a plain follower. Chain segments end-to-end (each From = the previous To). Call Finalize Typed Path (NOT Finalize Path) once all segments are added.

void AddArcSegment(const FFixedVector& From, const FFixedVector& To, const FFixedVector& Center, FFixedPoint Radius, FFixedPoint Sweep, bool bReverse);

Appends a STRAIGHT typed segment (From -> To) — the tangent legs between arcs when building a mixed straight + arc route by hand. Reverse marks it driven backward. Also pushes the endpoints onto the waypoint backbone. Call Finalize Typed Path once done.

void AddStraightSegment(const FFixedVector& From, const FFixedVector& To, bool bReverse);

Appends a PIVOT typed segment: turn in place at Location to Target Yaw (radians), as a tracked vehicle does before driving on. Adds Location to the waypoint backbone once. Call Finalize Typed Path once done.

void AddPivotSegment(const FFixedVector& Location, FFixedPoint TargetYaw);

Finishes a hand-built TYPED path (arc / straight segments added above). Unlike Finalize Path, this PRESERVES the typed segments you authored instead of rederiving them as plain straights, and sets total cost from the true segment lengths (an arc contributes its arc length). Set Is Partial if the route stops short of the destination; a move refuses a partial route.

void FinalizeTypedPath(bool bIsPartial);

Replaces the path with a straight line from start to destination, and reports success.

The flying default — a unit that ignores obstacles just goes straight. For ground units use Request Nav Path instead so they route around walls.

ESeinPathResult BuildStraightLinePath();

Runs the normal pathfinder to the destination and fills the path; reports the outcome.

This is what ground units do by default: a budgeted A* search using this unit’s footprint and navigation settings. The result is Found, Not Found, Throttled (out of search budget this tick, try again), or No Navigation. After it returns Found you can read the waypoints with Get Path Waypoint and rebuild a smoothed version if you want a custom driving line.

ESeinPathResult RequestNavPath();

How many points the current path has.

int32 GetPathWaypointCount() const;

The path point at a given index, or zero if out of range.

FFixedVector GetPathWaypoint(int32 Index) const;

Tests a straight line across the static navigation; returns whether it is blocked.

Returns true if something blocks the line (Out Hit Point is the first blocked spot), false if it is clear. Use it to decide whether a straight shortcut is possible before pathing around.

bool NavRaycast(const FFixedVector& From, const FFixedVector& To, FFixedVector& OutHitPoint) const;

The ground height at a world position. (Z is this engine’s up axis.)

Returns false if there is no navigation data there. Walkable Only ignores blocked cells (use it for ground units); turn it off to read the top of any cell (use it for flyers).

bool SampleGroundHeight(const FFixedVector& WorldPos, bool bWalkableOnly, FFixedPoint& OutHeight) const;

Snaps a world point onto the nearest navigable spot; returns whether it succeeded.

Use it when building a custom path so a hand-placed or smoothed waypoint lands on reachable ground (Out Projected is the snapped point). Returns false (Out Projected left unchanged) when there is no navigation data.

bool ProjectToNav(const FFixedVector& WorldPos, FFixedVector& OutProjected) const;

The terrain type index under a world position (0 = default / no terrain). Drives routing cost, traversal speed, and vision; map the index to your terrain set to read it meaningfully.

int32 GetTerrainTypeAt(const FFixedVector& WorldPos) const;

The terrain tag at a world position — the friendly identifier for the terrain class there (e.g. Terrain.Road). The named version of Get Terrain Type At; empty where there is no terrain.

FGameplayTag GetTerrainTagAt(const FFixedVector& WorldPos) const;

Whether the unit could stand at a world position right now: its footprint walkable and not blocked (static navigation plus current dynamic blockers). Use it to validate a waypoint before adding it.

bool IsPositionClear(const FFixedVector& WorldPos) const;

The size of one navigation grid cell, in world units — the grid granularity to space smoothed waypoints against.

FFixedPoint GetCellSize() const;
C++ members (1)
  • void SetContext(const FSeinPlanPathContext* InCtx, FSeinPath* InOutPath); C++-only wiring: the owning USeinMovement binds the context + output path for one dispatch.