Table of Contents

Animation Clip Asset

The animation clip asset is used to import a single animation for an animated mesh.

An animation clip represents a single motion, such as a walk cycle, a jump or other action. Simple animations can be played on a mesh using a simple animation component. For complex behavior you will need to use multiple clips and fade from one to the other at the right times. Use an animation graph for that.

Important:

In animation graph nodes animation clips are not referenced directly but rather through a name mapping. This mapping is configured in the animation graph asset.

Importing Many Animation Clips Quickly

In the asset browser select to show <Importable Files> then find your source animation clip file. Right click on it, and from the Import As sub-menu select Animation Clips (All). Finally, select an animated mesh as the preview model.

After this, the editor creates a new animation clip document for each animation that it finds in the file.

Asset Properties

  • File: The file from which to import the animation clip.

  • UseAnimationClip: The (case sensitive) name of the animation clip to import from the file. Transform the asset once to populate the list of AvailableClips. Then type the name of the desired clip into this field and transform the asset again. If a clip doesn't show up in the list, make sure it is correctly exported. See the chapter Authoring and Exporting Animations with Blender for known issues.

  • AvailableClips: After you transform the asset, this list will show all the animation clips that have been found in the given file.

  • FirstFrame, NumFrames: It is best to put every animation into a separate clip and export them that way. However, sometimes files contain only a single animation and each clip is found at another interval. By specifying the index of the first frame and the number of frames to use, you can extract individual clips from such data. Note that setting NumFrames to zero always means to use all the remaining frames after the first frame.

    Note: It can be difficult to know the exact indices. Sometimes the data is authored at 24 frames per second and also exported that way, then you can plug in the numbers straight away. However, GLTF/GLB files are always exported at 1000 FPS. That means if your animation clip was authored with 24 FPS and starts at the one second mark, in the GLB file this wouldn't be at keyframe 24, but instead at keyframe 1000.

  • PreviewMesh: The animated mesh to use for previewing this animation clip. This has to be set to see any preview.

  • RootMotion: If the animation clip should be able to move the game object, this can be achieved through root motion. This option allows you to select how root motion should be incorporated into the animation clip.

    For the time being the only mode available is constant motion, which means that when this clip is played, the parent object will be moved at a constant speed into a single direction. This can be used for walking animations, but it might be tricky to avoid foot sliding.

Playback

The toolbar buttons allow you to play/pause/reset and slow-down the animation playback. Additionally you can use the time scrubber right below the 3D viewport to manually play the animation. It is best to pause the automatic playback then.

Event Track

Below the time scrubber there is an additional strip to edit animation events. Here you can add events that shall occur at specific times during the animation clip playback, such as foot-down or fire-weapon. Use the time scrubber above to play the clip and inspect at which time the event shall occur. Then right click into the event track and select Add Event. Which type of event will be added is specified with the combo box at the bottom right.

See Also