PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

Keyframe

Show deprecated

Keyframe

Show deprecated

A Keyframe holds the Poses applied to joints in a Model at a given point of time in an animation. Keyframes are interpolated between during animation playback.

Note, in most cases developers do not need to manipulate KeyframeSequences as the animation editor covers most animation functionality. However, in some cases a developer may wish to generate an animation from a Script or build their own plugin.

Structure

Keyframes are held within a KeyframeSequence and contain Pose objects. The poses are named in accordance with the BaseParts they correspond to and are structured in terms of joint hierarchy. This means each Pose is parented to the Pose corresponding to the part it is attached to. See below for a visual example.

Note, as Poses are named in accordance with the BaseParts they correspond to, animations require distinct part names to play correctly.

Interpolation

During animation playback the poses in different keyframes are interpolated between. This allows a smooth animation to be created without needing to define every frame. Note, the style of interpolation is determined in the Pose object. The Keyframe object merely holds the Poses at a defined point of time in the animation (Keyframe/Time).

Properties

float

Time

This property gives the Keyframe's time position (in seconds) in an animation. This determines the time at which the Poses inside the keyframe will be shown.

Functions

void

AddMarker ( Instance marker )

Adds a KeyframeMarker to the Keyframe by parenting it to the keyframe

void

AddPose ( Instance pose )

This function adds a Pose to the Keyframe by parenting it to the keyframe.

Objects

GetPoses ( )

This function returns an array containing all Poses that have been added to a Keyframe

void

RemovePose ( Instance pose )

This function removes a Pose from the Keyframe by setting its Instance/Parent to nil.

Events