Skip to main content

Animation Controller

An animation controller evaluates an Animation Graph to choose, sample, and blend skeletal animation poses. Use it for locomotion, actions, layered animation, and transitions between states. For a single looping clip, use the Simple Animation Component.

Setup​

  1. Import a compatible skeleton, animated mesh, and animation clips.
  2. Create an Animation Graph asset. Give each clip a name in its Animation Clip Mapping.
  3. Connect a Sample Clip node's Out Pose to a Pose Result node's In Pose.
  4. Add an Animation Controller Component and assign its AnimGraph. Put the animated mesh on the same object so it can provide the skeleton.
  5. Simulate the scene. Use a blackboard to pass gameplay values into the graph.

An optional Animation Clip Set overrides named clips for a particular character.

Reading a Graph​

Current locomotion graph with blackboard inputs, a sequence, BlendSpace 2D, Pose Switch, and Pose Result

Open graph image at full size

This example selects between a jump sequence and a locomotion blend space. Number values from the blackboard control movement coordinates and the pose switch. Pose Result submits the selected pose for rendering.

Pin typeUse
BooleanA persistent true/false value, such as whether to loop.
NumberSpeed, blend coordinates, weights, and indices.
TriggerAn event during the current update, such as starting a clip.
Local poseA sampled or blended skeleton pose.
Bone weightsA mask controlling a pose's influence on individual bones.

A boolean remaining true is different from a trigger. Use Bool To Event when a change in a boolean should start an action.

Choosing and Combining Animations​

The controller combines submitted poses and converts them to model space internally. Older instructions that add Combine Poses, Local To Model Space, and Output nodes describe the previous graph system.

See Also​

In this section​

Animation Controller ComponentThe animation controller component is used to apply complex animation playback and blending functionality to an animated mesh. It is the big brother of the simple animation component.…
Animation Graph AssetCreate an Animation Graph asset to author skeletal animation playback. The Animation Controller Component evaluates it during simulation.
Animation Clip Set AssetAn Animation Clip Set maps the clip names used by an Animation Graph to a character's animation clip assets. This lets characters share a graph while using different animations.
Sample Clip and Sample FrameTo fade the clip's influence, change Pose Result's In Target Weight. Starting or stopping a fade is separate from restarting playback.
Sample SequenceUse clips authored to join cleanly at their boundaries. For cross-fades between independent actions, use Pose Switch.
BlendSpace 1DEach Clips entry has a named Clip, a numeric Position, and a Speed multiplier. Give entries distinct positions.
BlendSpace 2DSet CenterClip to the named clip at the origin, usually Idle. Add directional entries to Clips, each with a Clip name and two-dimensional Position. Drive X and Y from blackboard numbers,…
Pose BlendingUse Lerp Poses for continuous interpolation or Pose Switch for selecting a pose with a timed transition. Both output a local pose.
Local and Model SpaceSampling and blending nodes pass local poses, where each joint transform is relative to its parent. Connect these poses to Pose Result.
Pose Result and Root RotationFading the output does not itself restart the upstream clip. Drive the sampling node's start input separately when an action must begin again.
Animation State MachinesThe Animation Graph editor has a State Machine node for organizing named states and their pose graphs.
Bone Weight NodesBone masks let a pose affect only part of a skeleton, such as applying an attack to the upper body while the legs keep walking.
Blackboard NodesUse a blackboard to exchange gameplay state with the animation graph. Configure the named entries with the expected types and make the blackboard available to the Animation Controller…
Logic and Math NodesUse these nodes to adapt input values for playback and blending.
Event NodesConnect a playback event such as Sample Clip's Out On Finished or Pose Result's Out On Faded Out to In Activate. Handle the event on the animated object's event-handler component or a…
Controller Input NodeNumeric outputs include Left Stick X/Y, Right Stick X/Y, and Left Trigger/Right Trigger. Boolean outputs include Button A/B/X/Y, Left Shoulder/Right Shoulder, and Pad Left/Right/Up/Down.
Debugging Animation GraphsStart with a named Sample Clip connected directly to Pose Result. Verify that the graph's clip mapping resolves to a compatible clip, then add blending and conditions one at a time.