AccelTween
Provides a means to, with both a continuous position and velocity, accelerate from its current position to a target position in minimum time given a maximum acceleration. See Spring for another version of this.
Author: TreyReynolds/AxisAngles
Functions
new
AccelTween.
new
(
maxaccel:
number?
--
The maximum acceleration applied to reach its target. Defaults to 1
) →
AccelTween
Constructs a new AccelTween.
local accelTween = AccelTween.new(30)
accelTween.t = 1
conn = RunService.RenderStepped:Connect(function()
print(accelTween.p)
end)
task.delay(accelTween.rtime, function()
conn:Disconnect()
end)