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

Debugging Motion Matching Performance and Quality

Use visualization tools to inspect search queries and identify bottlenecks or poor pose matching in your high-fidelity locomotion system.

In this lesson, you will learn how to use visual debugging tools to diagnose why your Motion Matching system might be stuttering or choosing "jittery" poses during high-fidelity locomotion.

When Motion Matching doesn’t look right—perhaps the character is sliding or picking a choppy animation—the issue often lies in the "Search Query." The system constantly asks: "Given the current trajectory and pose, which frame in my database is the best match?" If the search query returns a poor result, your character will snap or jitter.

Visualizing the Query

To see this in action, open your Animation Blueprint and navigate to your Pose Search node. While running the game in PIE (Play in Editor), you can enable the Pose Search Debugger (found under Window > Animation > Pose Search Debugger).

This tool provides a live view of the "Trajectory" input versus the "Database" output. You will see:

  • Query Trajectory: Represented as a series of points (often colored lines) projected into the future.
  • Resulting Pose: The specific frame selected from your database.

Identifying Bottlenecks

If you see the search query constantly jumping between two different animations, your Cost Function is likely too sensitive or your data is noisy. Look for the "Cost" values in the debugger; if the system is struggling to find a match under a certain threshold, it may be forced to settle for a suboptimal pose.

You can inspect individual frames by pausing the game and scrubbing through the database in the debugger. If the trajectory points in the game world don't align with the trajectory points baked into your animation data, the math will fail, leading to poor visual quality.

// Within your AnimGraph, ensure your Search Schema is tightly scoped
// Use the Debugger to check if 'Pose Cost' is spiking above your 
// threshold during sharp character turns.

By observing these visual lines, you can determine if your trajectory prediction is lagging behind the character's actual movement or if your animation database simply lacks the variety needed for the current traversal speed.

Key Takeaway: Use the Pose Search Debugger to visually align your Trajectory Prediction with the resulting animation poses; if they don't match, your character will never move fluidly.