Course contentsShow
← Unreal Engine Game Development
Lesson 384 of 8805. Animation and Character RiggingFree lesson

Setting Up Motion Matching Pose Search

Implement the Pose Search plugin to query animation databases efficiently and retrieve the most appropriate frames for current movement.

In this lesson, you will learn how to configure the Pose Search plugin to query your animation databases so the engine automatically selects the perfect frame of animation for your character’s current movement.

The Core Concept: Pose Search

Motion Matching works by treating your animations as a searchable library. Instead of building complex State Machines with manual transitions, you provide the system with an Animation Data Asset. This asset contains a collection of high-quality clips. When the character moves, the Pose Search database constantly compares the character’s current trajectory and pose against this library to find the "best match."

Setting Up the Search

To implement this, you must first create an Animation Database asset. Think of this as the "brain" that stores the feature data for your clips.

  1. Define the Schema: Open your Animation Data Asset and assign a PoseSearchSchema. This tells the engine which bones to track (like the feet and pelvis) and how much weight to give to movement velocity versus orientation.
  2. Add Sequences: Populate the database with your tagged animation sequences. Ensure your clips have Root Motion enabled, as the database relies on the trajectory data (where the character is going) to decide which frame to pick next.
  3. The AnimGraph Integration: In your Animation Blueprint, you no longer use traditional states. Instead, you use the Motion Matching node. This node requires a reference to your database and a Trajectory Provider.

Example setup inside the AnimGraph:

// The Motion Matching node pulls data from the database
// based on the current movement trajectory sampled by the component.
Motion Matching -> Output Pose

Why It Works

Because the database is pre-processed, the search happens in a fraction of a millisecond. If your character starts running, the system samples the velocity and predicts the future path. It then scans the database for the animation frame that most closely aligns with that velocity and trajectory. This creates incredibly fluid transitions that feel natural without you having to manually define every single blend.

Key Takeaway: Motion Matching replaces manual state transitions by treating your animation library as a real-time search space that selects the best movement frame based on the character’s predicted trajectory.