PathBerserker2d  1.0
Platformer pathfinding solution
Public Member Functions | Public Attributes | Properties | List of all members
PathBerserker2d.PathSegment Class Reference

Encapsulates the movement on a segment to a link and the traversal of that link. More...

Public Member Functions

int GetTagVector (float t)
 Get the NavTag vector at a distance along the segment. More...
 
int GetTagVector (Vector2 pos)
 Like GetTagVector, but works by projecting the parameter on the segment. More...
 
float DistanceAlongSegment (Vector2 pos)
 Projects a position on the segment and returns its distance from the segment start. More...
 

Public Attributes

Vector2 SegmentNormal => cluster.Normal
 
readonly INavLinkInstance link
 
readonly NavSurface owner
 

Properties

PathSegment Next [get]
 
Vector2 LinkStart [get]
 World position of the link start. More...
 
Vector2 LinkEnd [get]
 World position of the link end. More...
 

Detailed Description

Encapsulates the movement on a segment to a link and the traversal of that link.

Only the last PathSegment does not have a link.

Member Function Documentation

◆ DistanceAlongSegment()

float PathBerserker2d.PathSegment.DistanceAlongSegment ( Vector2  pos)

Projects a position on the segment and returns its distance from the segment start.

◆ GetTagVector() [1/2]

int PathBerserker2d.PathSegment.GetTagVector ( float  t)

Get the NavTag vector at a distance along the segment.

Parameters
tDistance along segment.
Returns
Integer with bits set to the existence of the corresponding nav tag at that position.

◆ GetTagVector() [2/2]

int PathBerserker2d.PathSegment.GetTagVector ( Vector2  pos)

Like GetTagVector, but works by projecting the parameter on the segment.

Returns
Integer with bits set to the existence of the corresponding nav tag at that position.

Property Documentation

◆ LinkEnd

Vector2 PathBerserker2d.PathSegment.LinkEnd
get

World position of the link end.

◆ LinkStart

Vector2 PathBerserker2d.PathSegment.LinkStart
get

World position of the link start.


The documentation for this class was generated from the following file: