https://github.com/alecremer/unitybeziercurves
API that creates bezier curves based on N control points
https://github.com/alecremer/unitybeziercurves
bezier-curves math parametric-curves unity unity3d
Last synced: about 1 month ago
JSON representation
API that creates bezier curves based on N control points
- Host: GitHub
- URL: https://github.com/alecremer/unitybeziercurves
- Owner: alecremer
- License: mit
- Created: 2020-12-25T23:14:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-25T19:01:00.000Z (over 2 years ago)
- Last Synced: 2025-04-28T11:15:08.085Z (about 1 month ago)
- Topics: bezier-curves, math, parametric-curves, unity, unity3d
- Language: C#
- Homepage:
- Size: 20.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Unity Bezier curves
API that creates Bezier curves based on N control points.- Edit mode debugger
- Real time debug in editor and gameplay
- Baked curve to saving processing
- Calculate normal and tangent vectors
- Debug of parameter of parametric curve along the curve# Methods
## Curve
public Vector3 Curve(float curveStep, int controlPointIndex = 0)Calculate Bezier curve using control points
##### Arguments
curveStep: parameter of parametric curve that walks along the curve. 0 is the start of curve, 1 is the end of curve;
controlPointIndex: index of control point in sum of all control points. For calculate whole curve, don't use this parameter.##### Return
Point in space## BakeCurve
public List BakeCurve(float curveStepLenght)Calculate curve and store in list of baked point. It saves processing in game time
##### Arguments
curveStepLenght: parameter of parametric curve that walks along the curve. 0 is the start of curve, 1 is the end of curve;##### Return
List of BakedPoint# Classes
## BakedPoint
Precalculated curve point##### Properties
public Vector3 point: world point
public Vector3 tangent: point tangent vector
public Vector3 normal: point normal vector## ControlPoint
Control point of Bezier curve##### Properties
public GameObject point: object to get transform
public Color color: color of debug point