Skip to content

An easy to use bezier spline module, designed for TD games and general paths.

License

Notifications You must be signed in to change notification settings

omrezkeypie/BezierPath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

ABOUT

BezierPath is an easy to use bezier spline module, designed to be used for TD games and general paths while being optimizied for large scale uses.

NOTE: BezierPath is NOT a traditional bezier spline. it behaves more like a linear spline that curves around each point.

BezierPath can be installed using Wally:

BezierPath = "omrezkeypie/[email protected]"

To view the API and usage, go here

Example

A code snippet showing how to set up and use BezierPath.

local BezierPath = "Path to the module"
local Positions = {
    Vector3.new(0,10,0),
    Vector3.new(10,0,0),
    Vector3.new(10,10,10)
}
local NewPath = BezierPath.new(Positions,3)
local Part = Instance.new("Part",workspace)
Part.Size = Vector3.new(1,1,1)
Part.Anchored = true

for t = 0,1,1/100 do
    Part.CFrame = NewPath:CalculateUniformCFrame(t)
    task.wait(0.1)
end

A short video showing BezierPath.

2023-12-15.22-47-15.mp4