CurveAnimation

Show Deprecated

CurveAnimation is a subtype of AnimationClip consumed by Roblox's animation system. It stores animation data for each animated channel in a rig as a separate, individual curve. For example, CurveAnimation stores the position channel for an articulated joint as a Vector3Curve, and it might store the rotation channel as a EulerRotationCurve or RotationCurve.

Structure

CurveAnimation stores curves in a hierarchical manner, matching the hierarchy of the structure of Motor6Ds or Bones in the animated model. Under each CurveAnimation instance lies a hierarchy of Folder instances representing animated joints in the model. Under each such folder instance, several possible instances may exist. An instance named Position of type Vector3Curve can drive the local translation of the Motor6D or Bone on the animated model, while an instance named Rotation of type EulerRotationCurve or RotationCurve can drive the local rotation of the Motor6D or Bone on the animated model.

Partial matching of hierarchy

You can match partial hierarchies to a model when playing a CurveAnimation in Roblox's animation system. This means that not all joints need to be present in the hierarchy for the existing joints to apply properly. Furthermore, you can match hierarchies in a "relative" manner. For example, the first child Folder instance root can be UpperTorso and the animation system matches that to any existing sub-hierarchies in the model.

Animating miscellaneous channels

CurveAnimation can also animate other numerical values in a model. For example, you can animate FACS controls for facial animations by creating a Folder under the CurveAnimation instance named after an existing FaceControls instance in the model. Then, to animate individual facial controllers, you can store individual FloatCurve instances named after the animated FaceControls property.

Usage when making animations

As with other AnimationClip types such as KeyframeSequence, you must first upload CurveAnimation instances to Roblox before playing them. If you want to preview an animation before uploading it to Roblox, you can generate a temporary ID using AnimationClipProvider:RegisterAnimationClip(); this generates a hash ID that you can use for localized animation testing.

If you want to download the CurveAnimation corresponding to an existing uploaded animation using Luau scripts, use AnimationClipProvider:GetAnimationClipAsync().

Summary

Properties

Properties inherited from AnimationClip

Properties

Methods

Events