Simple Waypoint System
5.4
|
Stores waypoints of a bezier path, accessed by walker objects. Provides gizmo visualization in the editor. More...
Public Member Functions | |
override void | Create (Transform[] waypoints, bool makeChildren=false) |
Create or update waypoint representation from the array passed in, optionally parenting them to the path. More... | |
override Vector3[] | GetPathPoints (bool local=false) |
Returns waypoint positions (path positions) as Vector3 array. More... | |
override int | GetWaypointCount () |
Returns waypoint length (should be equal to events count). More... | |
override Transform | GetWaypoint (int index) |
Returns the bezier path waypoint transform according to the index passed in. More... | |
override int | GetWaypointIndex (int point) |
Converts bezier points on the path to waypoint index. Returns -1 if the point lies in between two waypoints. More... | |
void | CalculatePath () |
Recalculates final path points. Can be called at runtime to allow repositioning, but do consider update rate vs. performance! More... | |
![]() | |
void | Create (Transform parent=null) |
Create or update waypoint representation from child objects or external parent. More... | |
virtual float | GetHandleSize (Vector3 pos) |
Public Attributes | |
Vector3[] | pathPoints = new Vector3[]{} |
Path points (not waypoints) creating the path. More... | |
List< BezierPoint > | bPoints = new List<BezierPoint>() |
List to store bezier points for this path. More... | |
bool | showHandles = true |
Toggles drawing of control point handles. More... | |
bool | connectHandles = true |
Toggles independent control point handles on/off. More... | |
Color | color3 = new Color(108 / 255f, 151 / 255f, 1, 1) |
Gizmo color for control point handles. More... | |
float | pathDetail = 1 |
Detail value for interpolations when calculating path points. More... | |
bool | customDetail = false |
Toggles custom detail for single path segments. More... | |
List< float > | segmentDetail = new List<float>() |
List of detail values for single path segments, when enabled. More... | |
![]() | |
Transform[] | waypoints = new Transform[]{} |
Waypoint array creating the path. More... | |
bool | drawCurved = true |
Toggles drawing of linear or curved gizmo lines. More... | |
bool | drawDirection = false |
Toggles drawing of waypoint direction rotation. More... | |
Color | color1 = new Color(1, 0, 1, 0.5f) |
Gizmo color for path ends. More... | |
Color | color2 = new Color(1, 235 / 255f, 4 / 255f, 0.5f) |
Gizmo color for lines and waypoints. More... | |
Vector3 | size = new Vector3(.7f, .7f, .7f) |
Gizmo size for path ends. More... | |
float | radius = .4f |
Gizmo radius for waypoints. More... | |
bool | skipCustomNames = true |
Skip custom names on waypoint renaming. More... | |
GameObject | replaceObject |
Gameobject for replacing waypoints. More... | |
Stores waypoints of a bezier path, accessed by walker objects. Provides gizmo visualization in the editor.
void CalculatePath | ( | ) |
Recalculates final path points. Can be called at runtime to allow repositioning, but do consider update rate vs. performance!
|
virtual |
Create or update waypoint representation from the array passed in, optionally parenting them to the path.
Reimplemented from PathManager.
|
virtual |
Returns waypoint positions (path positions) as Vector3 array.
Reimplemented from PathManager.
|
virtual |
Returns the bezier path waypoint transform according to the index passed in.
Reimplemented from PathManager.
|
virtual |
Returns waypoint length (should be equal to events count).
Reimplemented from PathManager.
|
virtual |
Converts bezier points on the path to waypoint index. Returns -1 if the point lies in between two waypoints.
Reimplemented from PathManager.
List<BezierPoint> bPoints = new List<BezierPoint>() |
List to store bezier points for this path.
Color color3 = new Color(108 / 255f, 151 / 255f, 1, 1) |
Gizmo color for control point handles.
bool connectHandles = true |
Toggles independent control point handles on/off.
bool customDetail = false |
Toggles custom detail for single path segments.
float pathDetail = 1 |
Detail value for interpolations when calculating path points.
Vector3 [] pathPoints = new Vector3[]{} |
Path points (not waypoints) creating the path.
List<float> segmentDetail = new List<float>() |
List of detail values for single path segments, when enabled.
bool showHandles = true |
Toggles drawing of control point handles.