RotationCurveKey¶
A time-value pair used with RotationCurve instances.
Not implemented in Nova
This datatype is not registered in Nova's Lua VM. Constructing or receiving it from an API call will not work.
Description¶
A time-value pair used with RotationCurve instances.
The Interpolation property dictates the interpolation mode for the segment started by this key and ended by the next key on the curve. Each segment may use a different interpolation mode.
The LeftTangent and RightTangent properties apply to the cubic interpolation mode and define the desired tangent (slope) at the key. Different left and right values can be used to encode discontinuities in slope at the key. Attempting to set a RightTangent value on a key that doesn't use the cubic interpolation mode will result in a runtime error. It is possible to set the LeftTangent property on any key, as it will be used should the preceding segment use cubic interpolation.
Constructors¶
new Not yet Returns a new RotationCurveKey at a given time with a given CFrame.
Returns a new RotationCurveKey at a given time with a given CFrame.
Creates a new RotationCurveKey at a given time with a given CFrame. LeftTangent and RightTangent are left uninitialized and, if not initialized, tangent values of 0 will be used when evaluating the curve.
Properties¶
Interpolation Not yet The key interpolation mode for the segment started by this RotationCurveKey.
The key interpolation mode for the segment started by this RotationCurveKey.
Defines the interpolation mode used for the curve segment that begins at this key and ends at the next key. Possible values are KeyInterpolationMode.Constant (holds the key's value until the next key), KeyInterpolationMode.Linear (linearly interpolates between this key and the next using spherical linear interpolation), and KeyInterpolationMode.Cubic (uses a cubic hermite spline shaped by RightTangent and the next key's LeftTangent). Defaults to KeyInterpolationMode.Cubic.
Setting this property to a non-cubic mode automatically clears RightTangent (because tangent slope is only meaningful in cubic segments).
Time Not yet The time position of this RotationCurveKey.
The time position of this RotationCurveKey.
The time position of this RotationCurveKey along the curve's
timeline, in seconds. Keys within a RotationCurve are kept sorted
by ascending time; inserting a key at the same time as an existing key
replaces the existing key. Defaults to 0.
Value Not yet The CFrame value of this RotationCurveKey.
The CFrame value of this RotationCurveKey.
The rotation stored at this key, represented as a CFrame. Only the rotational component of the CFrame is used; the positional component is ignored. Defaults to CFrame.identity.
RightTangent Not yet The tangent to the right of this RotationCurveKey.
The tangent to the right of this RotationCurveKey.
The outgoing tangent (slope) at this key, controlling the shape of the
cubic segment that extends toward the next key. Defaults to 0. This
property can only be set when
Interpolation is
KeyInterpolationMode.Cubic; attempting to set it on a key with a
different interpolation mode raises a runtime error. Returns nil if the
tangent has not been explicitly assigned.
LeftTangent Not yet The tangent to the left of this RotationCurveKey.
The tangent to the left of this RotationCurveKey.
The incoming tangent (slope) at this key, controlling the shape of the
cubic segment arriving from the previous key. Defaults to 0. Unlike
RightTangent, this property can
be set on a key regardless of its own interpolation mode, because the
preceding segment may use cubic interpolation and needs a defined slope at
its endpoint. Returns nil if the tangent has not been explicitly
assigned.
Roblox reference: RotationCurveKey