Animator

Animator : Instance

Overview

The Animator class is responsible for managing the playback and replication of animations, including handling AnimationTracks and providing methods for loading, applying, and evaluating animations, with additional properties for controlling features like root motion and evaluation throttling.

Description

The Animator class serves as the core component for managing animation playback and replication in games, ensuring seamless synchronization of AnimationTracks across clients. It provides essential methods for loading, applying, and evaluating animations, while offering advanced control through properties like root motion handling, evaluation throttling, and Level of Detail (LOD) preferences. Additionally, the Animator integrates with tools like the Animation Editor to facilitate the creation and application of custom or pre-built animations, enhancing both character movement and overall game interactivity.

Properties

EvaluationThrottled

bool

EvaluationThrottled is a boolean property indicating whether the animation evaluation process is currently throttled for performance optimization purposes.

Code Samples

PreferLodEnabled

bool

PreferLodEnabled enables or disables the preference for Level of Detail (LOD) optimization in the animator.

Code Samples

RootMotion

CFrame

RootMotion represents the relative velocity and orientation changes applied to a character's root bone during animation.

Code Samples

RootMotionWeight

number

RootMotionWeight is a number property that controls the influence of root motion on an animation blending.

Code Samples

Methods

ApplyJointVelocities

The ApplyJointVelocities method accepts a reference to a Value containing motor data and applies joint velocities to specified motors or joints in a system.

Parameters

Value motors

Contains data for motors or joints

Return

void

Code Samples

GetPlayingAnimationTracks

The GetPlayingAnimationTracks method retrieves all currently playing AnimationTracks.

Parameters

Return

array

Code Samples

LoadAnimation

The LoadAnimation method loads an Animation object and creates a corresponding AnimationTrack.

Parameters

Animation InAnimation

The Animation object to be loaded

Return

AnimationTrack

Code Samples

RegisterEvaluationParallelCallback

It registers a callback function, allowing parallel execution alongside animation evaluation.

Parameters

Value InFunction

A Lua function to be executed in parallel

Return

void

Code Samples

StepAnimations

The StepAnimations method updates animations based on the specified time increment (InDeltaTime).

Parameters

number InDeltaTime

Time duration to progress animations

Return

void

Code Samples

Events