Skip to content

Api > AnimationCurve > Linear()


AnimationCurve.Linear(number timeStart, number valueStart, number timeEnd, number valueEnd)⚓︎

A straight Line starting at timeStart, valueStart and ending at timeEnd, valueEnd.

Parameters:⚓︎

Name Type Description
timeStart number The start time for the linear curve.
valueStart number The start value for the linear curve.
timeEnd number The end time for the linear curve.
valueEnd number The end value for the linear curve.

Returns:⚓︎

type Description
AnimationCurve The linear curve created from the specified values.

Usage⚓︎

---@type number
local timeStart;

---@type number
local valueStart;

---@type number
local timeEnd;

---@type number
local valueEnd;


local val0 = AnimationCurve:Linear(timeStart, valueStart, timeEnd, valueEnd)