Hi, if you look at the gif, check out how the ball curves when facing the right side, but when i face forward it seems different from when facing left, curving wise. how can i make it so the position of vector3 is like a “world-view” so regardless of where i view it will always be the same curve?
https://gyazo.com/5d63ede1e3177e997b9a8cbc81d28f68
Script:
local function lerp(a, b, c)
return a + (b - a) * c
end
local 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
local Volley = PartObjects.Bezier:Clone()
Volley.CFrame = HRP.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),-2) * CFrame.Angles(math.rad(math.random(-5,5)), math.rad(math.random(-5,5)), 0)
Volley.Parent = workspace.Effects
Debris:AddItem(Volley, 5)
for i = 1,35 do
local t = i/35
local updated = quadBezier(t, HRP.Position, Mhit.Position + Vector3.new(0,20,30), Mhit.Position) --quadBezier(t, HRP.Position, HRP.Position + Vector3.new(0,20,0), Mhit.Position)
Volley.Position = updated
wait(0.01)
end