Add this class to a line renderer and it'll add control points that let you turn your line into a bezier curve.
More...
|
| Transform[] | AdjustmentHandles |
| | a list of handles to control your line. Usually 4, but you can have more.
|
| int | NumberOfSegments = 50 |
| | the amount of segments of the line renderer (more segments, less visible straight lines)
|
| string | SortingLayerName = "Default" |
| | the sorting layer for this line renderer
|
| int | NumberOfCurves = 0 |
| | the amount of curves we're working with
|
|
| virtual void | Awake () |
| | On Awake we initialize our line renderer.
|
| virtual void | Initialization () |
| | Grabs the sorting layer, computes the amount of curves.
|
| virtual void | LateUpdate () |
| | On Update we draw our curve.
|
| virtual void | DrawCurve () |
| | For each point, determines the bezier position and feeds it to the line renderer.
|
| virtual Vector3 | BezierPoint (float t, Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3) |
| | Computes the coordinates of a point on the bezier curve controlled by p0, p1, p2 and p3.
|
Add this class to a line renderer and it'll add control points that let you turn your line into a bezier curve.
◆ Awake()
| virtual void MoreMountains.Tools.MMBezierLineRenderer.Awake |
( |
| ) |
|
|
protectedvirtual |
On Awake we initialize our line renderer.
◆ BezierPoint()
| virtual Vector3 MoreMountains.Tools.MMBezierLineRenderer.BezierPoint |
( |
float | t, |
|
|
Vector3 | p0, |
|
|
Vector3 | p1, |
|
|
Vector3 | p2, |
|
|
Vector3 | p3 ) |
|
protectedvirtual |
Computes the coordinates of a point on the bezier curve controlled by p0, p1, p2 and p3.
- Parameters
-
- Returns
◆ DrawCurve()
| virtual void MoreMountains.Tools.MMBezierLineRenderer.DrawCurve |
( |
| ) |
|
|
protectedvirtual |
For each point, determines the bezier position and feeds it to the line renderer.
◆ Initialization()
| virtual void MoreMountains.Tools.MMBezierLineRenderer.Initialization |
( |
| ) |
|
|
protectedvirtual |
Grabs the sorting layer, computes the amount of curves.
◆ LateUpdate()
| virtual void MoreMountains.Tools.MMBezierLineRenderer.LateUpdate |
( |
| ) |
|
|
protectedvirtual |
On Update we draw our curve.
◆ _initialized
| bool MoreMountains.Tools.MMBezierLineRenderer._initialized = false |
|
protected |
◆ _lineRenderer
| LineRenderer MoreMountains.Tools.MMBezierLineRenderer._lineRenderer |
|
protected |
◆ _p
| Vector3 MoreMountains.Tools.MMBezierLineRenderer._p |
|
protected |
◆ _point
| Vector3 MoreMountains.Tools.MMBezierLineRenderer._point |
|
protected |
◆ _sortingLayerID
| int MoreMountains.Tools.MMBezierLineRenderer._sortingLayerID |
|
protected |
◆ AdjustmentHandles
| Transform [] MoreMountains.Tools.MMBezierLineRenderer.AdjustmentHandles |
a list of handles to control your line. Usually 4, but you can have more.
◆ NumberOfCurves
| int MoreMountains.Tools.MMBezierLineRenderer.NumberOfCurves = 0 |
the amount of curves we're working with
◆ NumberOfSegments
| int MoreMountains.Tools.MMBezierLineRenderer.NumberOfSegments = 50 |
the amount of segments of the line renderer (more segments, less visible straight lines)
◆ SortingLayerName
| string MoreMountains.Tools.MMBezierLineRenderer.SortingLayerName = "Default" |
the sorting layer for this line renderer
The documentation for this class was generated from the following file: