2.0 Help

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 controller 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.

Events

The component will broadcast the event plMsgGenericEvent 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

Last modified: 09 June 2024