The editor part of this class allows you to create paths in 2D or 3D space. At runtime, it manages path instances for easy lookup of references.
More...
|
static void | AddPath (GameObject path) |
| Adds the gameobject to the path dictionary, if it contains a path component. More...
|
|
static void | CleanUp () |
| Clears destroyed path gameobjects from the Paths dictionary. More...
|
|
static void | DrawStraight (Vector3[] waypoints) |
| Draws straight gizmo lines between waypoints. More...
|
|
static void | DrawCurved (Vector3[] pathPoints) |
| Draws curved gizmo lines between waypoints, taken and modified from HOTween. More...
|
|
static Vector3[] | GetCurved (Vector3[] waypoints) |
|
static Vector3 | GetPoint (Vector3[] gizmoPoints, float t) |
| Gets the point on the curve at a given percentage (0-1). Taken and modified from HOTween. More...
|
|
static float | GetPathLength (Vector3[] waypoints) |
| Calculates the total path length. More...
|
|
static List< Vector3 > | SmoothCurve (List< Vector3 > pathToCurve, int interpolations) |
| Smoothes a list of Vector3's based on the number of interpolations. Credits to "Codetastic". More...
|
|
The editor part of this class allows you to create paths in 2D or 3D space. At runtime, it manages path instances for easy lookup of references.
static void AddPath |
( |
GameObject |
path | ) |
|
|
static |
Adds the gameobject to the path dictionary, if it contains a path component.
Clears destroyed path gameobjects from the Paths dictionary.
static void DrawCurved |
( |
Vector3[] |
pathPoints | ) |
|
|
static |
Draws curved gizmo lines between waypoints, taken and modified from HOTween.
static void DrawStraight |
( |
Vector3[] |
waypoints | ) |
|
|
static |
Draws straight gizmo lines between waypoints.
static Vector3 [] GetCurved |
( |
Vector3[] |
waypoints | ) |
|
|
static |
static float GetPathLength |
( |
Vector3[] |
waypoints | ) |
|
|
static |
Calculates the total path length.
static Vector3 GetPoint |
( |
Vector3[] |
gizmoPoints, |
|
|
float |
t |
|
) |
| |
|
static |
Gets the point on the curve at a given percentage (0-1). Taken and modified from HOTween.
static List<Vector3> SmoothCurve |
( |
List< Vector3 > |
pathToCurve, |
|
|
int |
interpolations |
|
) |
| |
|
static |
Smoothes a list of Vector3's based on the number of interpolations. Credits to "Codetastic".
Stores all path components in the scene along with their name. You can access them by calling WaypointManager.Paths["path name"].
KeyCode placementKey = KeyCode.P |
Key for placing new waypoints in the scene
KeyCode viewPlacementKey = KeyCode.C |
Key for placing new waypoints at the current scene view camera position
The documentation for this class was generated from the following file: