#curve visualization like bedwars
7 messages · Page 1 of 1 (latest)
so what u needa do is
if its a formula with 3 points then use these
function lerp(a,b,c)
return a + (b-a)*c
end
function QuadBezier(t,p0,p1,p2)
local l1 = lerp(p0,p1,t)
local l2 = lerp(p1,p2,t)
local quad = lerp(l1,l2,t)
return quad
end
t is the time p0 is the starting position p1 is the part that makes it curve and not linear that makes it curve and p2 is the end position
then u use this
for i = 0,1,0.1 do
Handle.Position = QuadBezier(i,part0,part1,part2.Position)
game:GetService("RunService").Heartbeat:Wait()
end