SeinARTS Navigation Library
Class · USeinNavigationBPFL : UBlueprintFunctionLibrary
#include "Lib/SeinNavigationBPFL.h"
deterministic: safe in simulation code
Blueprint nodes for navigation: finding paths, testing reachability and line of sight over the static grid, sampling ground height and terrain, and reading the contents of a path.
Blueprint nodes
Section titled “Blueprint nodes”Find Path
Section titled “Find Path”Finds a path from Start to End for a unit, routing around obstacles. Returns the path; check Is Path Valid before reading its waypoints.
Runs the active navigation’s pathfinder. Requester identifies the unit (so its body size is accounted for); Blocked Terrain Tags are terrain classes this unit can’t cross (e.g. water for infantry). The result may be partial — a best-effort route toward an unreachable goal — and Is Path Valid is still true for a partial path.
static FSeinPath SeinFindPath(const UObject* WorldContextObject, FFixedVector Start, FFixedVector End, FSeinEntityHandle Requester, FGameplayTagContainer BlockedTerrainTags);Query Nav Direction
Section titled “Query Nav Direction”Asks the navigation “from here, which way to the goal?” — returns a single planar direction.
The pull-style complement to Find Path: instead of a whole route it returns the unit direction to head this tick (zero = stop / arrived / no route). Field-based navigation (flow fields) answers this cheaply every tick; the shipped grid nav answers by routing and returning the first step (so for the grid nav, prefer Find Path for ordinary movement). Group Id lets a shared-field nav reuse one field for an ordered group (0 = lone unit).
Defaults: GroupId = 0.
static FFixedVector SeinQueryNavDirection(const UObject* WorldContextObject, FFixedVector From, FFixedVector Goal, FSeinEntityHandle Requester, FGameplayTagContainer BlockedTerrainTags, int64 GroupId = 0);Is Location Reachable
Section titled “Is Location Reachable”Can an agent class get from one point to another at all? Returns true if a route exists.
A fast connectivity check, cheaper than Find Path — it answers reachability without building the route. Agent Tags identify capabilities/classification to a custom navigation implementation; the shipped grid has no tag-selected topology and therefore ignores them. Entity command validation automatically uses the unit’s complete authored policy, including blocked terrain, footprint, and wall padding; prefer that path when gating real orders.
static bool SeinIsLocationReachable(const UObject* WorldContextObject, FFixedVector From, FFixedVector To, FGameplayTagContainer AgentTags);Get Random Reachable Point
Section titled “Get Random Reachable Point”Picks a random walkable point within Radius of Origin that the origin can actually reach.
Deterministic: the same Seed always returns the same point, so it is lockstep-safe — derive Seed from sim state (e.g. entity id + tick), never from wall-clock. Returns false (and leaves Out Point at Origin) when nothing suitable is found: a sparse area, a tiny radius, or no baked nav.
static bool SeinGetRandomReachablePoint(const UObject* WorldContextObject, FFixedVector Origin, FFixedPoint Radius, int64 Seed, FFixedVector& OutPoint);Nav Raycast
Section titled “Nav Raycast”Tests a straight line across the static navigation; returns whether it is blocked.
Returns true if something blocks the line before reaching To (Out Hit Point is the first blocked spot, otherwise To). Cheap — no pathfinding. Use it to check a straight shortcut before routing the long way around.
static bool SeinNavRaycast(const UObject* WorldContextObject, FFixedVector From, FFixedVector To, FFixedVector& OutHitPoint);Get Cell Height At
Section titled “Get Cell Height At”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 samples only walkable cells — use it for ground units, so they ignore blocked slivers; turn it off to read the top of any cell — use it for flyers, so they ride over buildings.
static bool SeinGetCellHeightAt(const UObject* WorldContextObject, FFixedVector WorldPos, bool bWalkableOnly, FFixedPoint& OutHeight);Get Terrain Type At
Section titled “Get Terrain Type At”The terrain type index under a world position (0 = the default / no terrain).
Identifies which authored terrain class covers that spot — the value that drives routing cost, traversal speed, and vision. Map the index to your terrain set to read it meaningfully. Returns 0 where there is no terrain data.
static int32 SeinGetTerrainTypeAt(const UObject* WorldContextObject, FFixedVector WorldPos);Get Terrain Tag At
Section titled “Get Terrain Tag At”The terrain tag at a world position — the friendly identifier for the terrain class there.
The named version of Get Terrain Type At: it maps the terrain index to its tag in your terrain set (e.g. Terrain.Road, Terrain.Mud). Returns an empty tag where there is no terrain. Branch on this to make terrain-aware decisions by name instead of by index.
static FGameplayTag SeinGetTerrainTagAt(const UObject* WorldContextObject, FFixedVector WorldPos);Is Position Clear
Section titled “Is Position Clear”Whether a unit could stand at a world position right now — walkable ground and not blocked.
Considers the static navigation plus any current dynamic blockers, so it answers “is this spot free?” at this moment. Use it to validate a destination before ordering a unit there, or a spot before placing something.
static bool SeinIsPositionClear(const UObject* WorldContextObject, FFixedVector WorldPos);Get Cell Size
Section titled “Get Cell Size”The size of one navigation grid cell, in world units.
The granularity of the nav grid — useful when reasoning about how finely a hand-built or smoothed path needs its points spaced. Returns 0 when there is no navigation.
static FFixedPoint SeinGetCellSize(const UObject* WorldContextObject);Is Path Valid
Section titled “Is Path Valid”True when the path is usable. A partial path is valid; check its Is Partial flag to see whether it reaches the destination.
static bool SeinIsPathValid(const FSeinPath& Path);Get Path Waypoints
Section titled “Get Path Waypoints”The path’s points in order, from start to destination.
static TArray<FFixedVector> SeinGetPathWaypoints(const FSeinPath& Path);Get Path Segments
Section titled “Get Path Segments”The path’s typed segments — the typed stretch between each pair of waypoints (Straight today).
Where Get Path Waypoints gives the turn points, this gives how to travel between them: read a segment’s type to drive a path by segment (follow a curve, brake into an arc). Empty for simple paths that never derived segments; otherwise one segment per consecutive waypoint pair.
static TArray<FSeinPathSegment> SeinGetPathSegments(const FSeinPath& Path);Get Path Length
Section titled “Get Path Length”How many points the path has — a count, NOT a world distance. For travel distance use Get Path Cost.
static int32 SeinGetPathLength(const FSeinPath& Path);Get Path Cost
Section titled “Get Path Cost”The total planar length of the path in world units (the sum of its segments).
Use it to compare routes by travel distance — e.g. which of several reachable targets is nearest by path rather than by straight line. Does not include terrain cost weighting.
static FFixedPoint SeinGetPathCost(const FSeinPath& Path);