[Animation] 2. Animator component

Click to visit the Animator component on the official website

1. Introduction to Animator Components

Use the Animator component to assign animations to game objects in the scene. The Animator component needs a reference to the Animator Controller , which defines which animation clips to use and controls when and how blending and transitions between animation clips occur.

  • If the game object is a humanoid character with an Avatar definition, the Avatar should also be assigned in this component

insert image description here

The following diagram shows how the various resources (Animation Clips, Animator Controller, and Avatar) are brought together in the Animator component of a Game Object:

insert image description here

See also State Machines , Blend Trees , Avatars , Animator Controllers if needed

2. Attributes

Attributes secondary attribute Function
Controller An Animator Controller attached to this character.
Avatar The Avatar for this character . (if Animator is used to animate humanoid characters)
Apply Root Motion Choose to control the character's position and rotation from the animation itself or from a script.
Update Mode This option allows you to choose when the Animator updates and which timescale it should use.
Normal The Animator is updated synchronously with the Update call, and the Animator's speed matches the current timescale. If the timescale slows down, the animation will slow down to match.
Animate Physics The Animator is updated synchronously (that is, in lockstep with the physics system) with the FixedUpdate call. You should use this mode if you want to animate the movement of an object with physical interaction, such as a character that pushes a rigid body object around.
Unscaled Time The Animator updates synchronously with the Update call, but the Animator's speed ignores the current timescale and animates at 100% speed anyway. This option can be used to animate GUI systems at normal speed while using a modified timescale for special effects or pausing the game.
Culling Mode The culling mode you can choose for animation.
Always Animate Always animate and don't cull even when offscreen.
Cull Update Transforms Disables redirection, IK (inverse kinematics) and writing of transform components when the renderer is not shown.
Cull Completely When the renderer is not shown, animations are completely disabled.

3. Animation curve information

The information box at the bottom of the Animator component gives you a breakdown of the data used in all clips used by the Animator Controller.

Animation clips contain data in the form of "curves"; curves represent how values ​​change over time. These curves can describe the position or rotation of an object, the flexing of a muscle in a humanoid animation system, or other animated values ​​within a clip (such as a changing material color).

◆ The following table describes what each data item represents:

Label describe
Clip Count The total number of animation clips used by the Animator Controller assigned to this Animator.
Curves (Pos, Rot & Scale) The total number of curves used by Unity to animate the position, rotation or scale of the GameObject. These curves are used for animated game objects that are not part of the standard humanoid skeleton. When animating a humanoid avatar, these curves show the count of additional non-muscle bones such as tails, flowing cloth, or dangling pendants. If you are animating a human figure and seeing unexpected non-muscle animation curves, there may be unnecessary animation curves in the animation file.
Muscles The number of muscle animation curves this Animator uses for humanoid animation. These are the curves used to animate the muscles of a standard humanoid avatar. In addition to the standard muscle motion for all humanoid skeletons in Unity's standard Avatar, two "muscle curves" for storing root motion position and rotation animations are included here.
Generic The number of numeric (float) curves used by Animator to animate other properties such as material color.
PPtr Total number of sprite animation curves (used by Unity's 2D system)
Curves Count Aggregated total number of animation curves
Constant Number of animation curves optimized to a constant (unchanging) value. Unity will automatically select this if the animation file contains curves with constant values.
Dense Number of animation curves to optimize using "dense" data (discrete values ​​via linear interpolation) storage method. This method uses much less memory than the "stream" method.
Stream Stores the number of animation curves for the method using "flow" data (these values ​​have time and tangent data for curve interpolation). This data takes much more memory than the "dense" approach.

Guess you like

Origin blog.csdn.net/qq_30769437/article/details/130452577