BezierTweening is a library made to easily make a part follow along a bezier curve. BezierTweening was made with simplicity in mind and is designed to mimic TweenService’s functions.
Bezier curves can have 2 anchor points and infinite amount of control points. Also, quadratic and cubic bezier curves get their name not from the amount points but the amount of linear interpolations that take place. Amazing use of linear interpolation, great work!
This is an extremely useful module. Thank you so much for making it. I did notice some spelling mistakes on your example code, but other than that I love it. Thanks again!
Any chance this could be used or updated to tween movement of the attach1 CFrame being tweened to move foward on the Z axis? Similar to a charge up bow and arrow system where the arc updates/tweens over time accurately with the attach1 of the beam being tweened forward at the same time?
How do I make the part look at the next position it’s gonna be? I don’t know where to change it’s orientation to make it look at it’s next position. Help would be appreciated
How would I use this to tween the camera? I’m trying to create a spectate system using this library
I have this code right now but it errors:
local Bez = require(script.Parent.BezierTweens)
local Waypoints = Bez.Waypoints
script.Parent.MainFrame.TextButton.MouseButton1Down:Connect(function()
local CameraPart = Instance.new('Part', workspace)
CameraPart.CFrame = workspace.CurrentCamera.CFrame
local OtherPlayer
for i, v in pairs(game.Players:GetPlayers()) do
if v ~= game.Players.LocalPlayer then
OtherPlayer = v
end
end
local waypoints = Waypoints.new(CameraPart, OtherPlayer.Character.Head)
local tween = Bez.Create(workspace.CurrentCamera, {
Waypoints = waypoints,
EasingStyle = Enum.EasingStyle.Quad,
EasingDirection = Enum.EasingDirection.Out,
Time = 1,
})
tween:Play()
end)
Error: Position is not a valid member of Camera "Workspace.Camera"
Does anyone know how to properly tween the camera with this library? Any help would be appreaciated
Camera doesn’t use Position, it only operates with CFrame.
I could be wrong but I think the best way to do this is attaching the camera to a part or attachment, then maneuver the part