Skip to main content

NormalizedPath

A internal struct in Root.Township, Alta.Pathfinding. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Internal helper for Walker: a navigation path from the agent's position through the nav corners, measured so a position can be found by progress from 0 to 1.

Constructors​

MemberWhat it is
NormalizedPath(Vector3 origin, List<Vector3> points)Creates a NormalizedPath from origin and points.

Fields​

MemberWhat it is
Vector3 targetThe last point of the path.
float totalLengthTotal length of all segments.
3 private and internal fields
MemberWhat it is
private float[] lengthsLength of each segment.
private Vector3[] pointsThe path's points, starting with the origin.
private int pointsLengthNumber of segments.

Methods​

MemberWhat it is
Vector3 GetPosition(float progress, ref bool isFinished)Returns the point at the given share of the path's length; past 1 it returns the end and sets isFinished.

Used in​

Members of other types that take, return or hold a NormalizedPath: