A* Pathfinding Project
4.1.19
The A* Pathfinding Project for Unity 3D
|
Interpolates along a sequence of points. More...
Interpolates along a sequence of points.
Public Member Functions | |
void | MoveToCircleIntersection2D (Vector3 circleCenter3D, float radius, IMovementPlane transform) |
void | MoveToClosestPoint (Vector3 point) |
Move as close as possible to the specified point. More... | |
void | MoveToLocallyClosestPoint (Vector3 point, bool allowForwards=true, bool allowBackwards=true) |
void | MoveToSegment (int index, float fractionAlongSegment) |
Move to the specified segment and move a fraction of the way to the next segment. More... | |
void | SetPath (List< Vector3 > path) |
Set the path to interpolate along. More... | |
Protected Member Functions | |
virtual void | NextSegment () |
virtual void | PrevSegment () |
Properties | |
float | distance [get, set] |
Traversed distance from the start of the path. More... | |
virtual Vector3 | position [get] |
Current position. More... | |
float | remainingDistance [get, set] |
Remaining distance until the end of the path. More... | |
int | segmentIndex [get, private set] |
Current segment. More... | |
Vector3 | tangent [get] |
Tangent of the curve at the current position. More... | |
bool | valid [get] |
True if this instance has a path set. More... | |
Private Attributes | |
float | currentDistance |
float | currentSegmentLength = float.PositiveInfinity |
float | distanceToSegmentStart |
List< Vector3 > | path |
float | totalDistance = float.PositiveInfinity |
void MoveToCircleIntersection2D | ( | Vector3 | circleCenter3D, |
float | radius, | ||
IMovementPlane | transform | ||
) |
void MoveToClosestPoint | ( | Vector3 | point | ) |
Move as close as possible to the specified point.
void MoveToLocallyClosestPoint | ( | Vector3 | point, |
bool | allowForwards = true , |
||
bool | allowBackwards = true |
||
) |
void MoveToSegment | ( | int | index, |
float | fractionAlongSegment | ||
) |
Move to the specified segment and move a fraction of the way to the next segment.
|
protectedvirtual |
|
protectedvirtual |
void SetPath | ( | List< Vector3 > | path | ) |
Set the path to interpolate along.
This will reset all interpolation variables.
|
private |
|
private |
|
private |
|
private |
|
private |
|
getset |
Traversed distance from the start of the path.
|
get |
Current position.
|
getset |
Remaining distance until the end of the path.
|
getprivate set |
Current segment.
The start and end points of the segment are path[value] and path[value+1].
|
get |
Tangent of the curve at the current position.
|
get |
True if this instance has a path set.