Hi, I’ve been dealing with this problem for a really long time now and I have a Bezier Curve that should have both loops and a smooth curve alignment. Unfortunately, as soon as I change Up to Vector3.new(0,1,0) the curve rotates smoothly but doesn’t loop. When I do Up to direction:Cross(right).Unit, there are loops but no smooth rotation.
Smooth rotation:
for i = 0, numPoints do
local t = i / numPoints
local nextT = (i + 1) / numPoints
local slerpPosition = bezier(StartPart.Position, ControlPart.Position, EndPart.Position, t)
local nextPosition = bezier(StartPart.Position, ControlPart.Position, EndPart.Position, nextT)
local direction = (nextPosition - slerpPosition).Unit
local right = previousUp:Cross(direction).Unit
local up = Vector3.new(0,1,0)
No smooth rotation but loopings:
for i = 0, numPoints do
local t = i / numPoints
local nextT = (i + 1) / numPoints
local slerpPosition = bezier(StartPart.Position, ControlPart.Position, EndPart.Position, t)
local nextPosition = bezier(StartPart.Position, ControlPart.Position, EndPart.Position, nextT)
local direction = (nextPosition - slerpPosition).Unit
local right = previousUp:Cross(direction).Unit
local up = direction:Cross(right).Unit
Btw the up value just keeps changing.
Thanks for every answer, I really don’t know how to solve it.