I Want to make a projectile that zigzags, in a smooth Cubic Bezier fashion, but not using Lerp (since the projectile needs to interact with the surroundings)
The Full DevForum article is here:
https://devforum.roblox.com/t/easiest-way-to-bezier-a-projectile-using-bodymovers/1053411
The DevForum article contains videos of zigzagging projectiles.
Below is an Imitation of a smooth zigzag.
local TweenService = game:GetService("TweenService")
local Time = 0.15
while true do --Imitates a ZigZag Motion
TweenService:Create(script.Parent,TweenInfo.new(Time/2,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0),{Velocity = Vector3.new(80,20,0)}):Play()
wait(Time/2)
TweenService:Create(script.Parent,TweenInfo.new(Time,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0),{Velocity = Vector3.new(-160,20,0)}):Play()
wait(Time)
TweenService:Create(script.Parent,TweenInfo.new(Time/2,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0),{Velocity = Vector3.new(80,20,0)}):Play()
wait(Time/2)
end
