Table of Contents

Simple Animation Component

The simple animation component is used to play a single animation clip on an animated mesh.

The component has to be attached on a game object that also has an animated mesh component. The selected animation clip has to be compatible with the mesh's skeleton.

For more complex scenarios use an animation graph instead.

Component Properties

  • AnimationClip: The animation clip to play.

  • AnimationMode: How to play the animation:

    • Once: The animation is played exactly once and then stops.
    • Loop: The animation is played in an endless loop.
    • BackAndForth: The animation is played to its end, then it reverses and plays back to the start. Then the cycle repeats.
  • Speed: The playback speed. A speed of zero pauses playback. A negative speed makes the animation play backwards. The speed can be changed at any time.

  • RootMotionMode: Selects how root motion is applied to the owning game object.

  • InvisibleUpdateRate: How often to update the animation when the object is not visible. For performance reasons the update rate should be very low or even paused when an object isn't visible. However, since animations may have an important impact on gameplay, it can be undesirable to have a lower update rate even when the object is not visible. Note that this affects the update rate of objects that are not visible by the main camera, but by a shadow casting light. Objects whose shadow can be seen generally get updated, but at a low rate, unless this setting forces a higher update rate.

  • Enable IK: If inverse kinematics, such as aim IK or two bone IK shall affect the animated mesh, this option needs to be enabled.

Animation Events

The component will broadcast the event ezMsgGenericEvent every time it encounters an animation event in the animation clip. Custom code can listen for these events and trigger relevant game mechanics.

See Also