Skip to main content

AnimationCurve.AddKey(Keyframe key)

Add a new key to the curve.

Parameters:

NameTypeDescription
keyKeyframeThe key to add to the curve.

Returns:

typeDescription
numberThe index of the added key, or -1 if the key could not be added.

Usage

---@type AnimationCurve
local animationcurve;

---@type Keyframe
local key;


local val0 = animationcurve.AddKey(key)

if the key could not be added. |

Usage

---@type AnimationCurve
local animationcurve;

---@type number
local time;

---@type number
local value;


local val0 = animationcurve.AddKey(time, value)