-
Notifications
You must be signed in to change notification settings - Fork 3
API
BezierPath.new(Positions : {Vector3},CurveSize : number | {number}) : PathTakes in a table of positions which will be used as the waypoints for the spline and takes in a number to control the size of the curve between the waypoints and returns the path object.
Optionally you can also input a table of curve sizes where each curve size corresponds to the same position in the positions table. if an index is empty in the curve size table BezierPath will use the default curve size which is 3.
Path:CalculateUniformCFrame(T : number) : CFrameTakes in a T value from 0-1 and returns a uniform cframe across the path object.
Path:CalculateUniformPosition(T : number) : PositionTakes in a T value from 0-1 and returns a uniform position across the path object.
Path:GetPathLength() : numberReturns the path objects length.
Path:CalculateDerivative(T : number) : Vector3Takes in a T value from 0-1 and returns the derivative of that T value.
Path:CalculateClosestPoint(Position : Vector3) : (CFrame,number)Takes in a Vector3 position and returns the closest cframe and the closest T value on the path to the inputted position.
Path:VisualizePath()Visualizes the path. Used for debug purposes.