Inherits: Instance
The Animator handles the animation of animatable joints in a Model.
It blends and interpolates between keyframes in multiple playing AnimationTracks to update joint target poses every frame.
Animator searches for animatable joints (including Motor6Ds, legacy Motors, and Bones) in descendants of it's ancestor Model.
Animator matches animatable joints to poses stored in an Animation asset based on the names of the parts the joint is connected to. For a Motor6D, Part0.Name
is the "parent" name, and Part1.Name
is the "child" name.
Inside of every Animation asset model file is a KeyframeSequence containing several Keyframe instances, each containing a tree of Poses. The poses are matched to joints where Pose.Parent.Name
is the "parent" name, and Pose.Name
is the "child" name.
The Animator ignores the names of the joints themselves.
Animators are stepped every frame before RunService.Stepped. This updates the target poses of animatable joints, like Motor6D.Transform or Bone.Transform. The actual updating of the relative positions of the animated parts is defered until the internal physicsStepped
, after Stepped.
For each joint the Animator will blend the the interpolated poses between keyframes in playing AnimationTracks within the same Priority according to their [AnimationTrack.Weight]. AnimationTracks playing with a higher priority override any tracks playing with a lower priority.
If the sum of the [Weights][AnimationTrack.Weight] add up to more than 1, some tracks may be ignored.
If an Animator's model has no animated joints available it will stop any playing AnimationTracks on the next step.
The replication of playing animations is handled through special internal RemoteEvents on the Animator itself.
If the Animator is the descendant of a Character then animations started by that player can replicate to other clients. Otherwise animations started by LocalScripts will only play locally.
There is a limit of 10 unique playing animations that can be replicated at any one time.
No description available.
Loads an AnimationTrack from an animation asset represented by an Animation. The animation is not started automatically, but can be started by calling AnimationTrack.Play.
The animation will fail to load if it is not owned by the owner of the current place.
Name | Type | Description |
---|---|---|
animation | Animation | An Animation representing the animation asset to load. |
Type | Description |
---|---|
AnimationTrack | The loaded AnimationTrack. |
Manually steps animations while the game is not running. Intended for previewing animations in Studio edit mode.
Updates the target poses of animatable joints and updates the relative positions of parts if the joints are Active.
Throws if the game is running.
Name | Type | Description |
---|---|---|
deltaTime | float | The amount of time in seconds to advance playing animations by. |
No description available.