Quick Start Guide
Get your first Motion Matching character up and running in 30 minutes.
Prerequisites
Before starting, ensure you have:
- Unity 2020.3 LTS or newer (2022.3 LTS recommended)
- MxM installed - See Installation Guide
- Humanoid or Generic rigged character with animation clips
- 10-20 animation clips minimum (locomotion recommended for first test)
First Time with Motion Matching?
Motion Matching works differently than traditional animators. Instead of setting up state machines and transitions, you'll be creating an animation database that the system searches in real-time.
Step 1: Prepare Your Animation Clips
What You Need
For a basic locomotion setup, gather these animation types:
| Animation Type | Quantity | Examples |
|---|---|---|
| Idle | 1-2 clips | Standing idle, breathing |
| Walk | 2-4 clips | Walk forward, walk strafe left/right |
| Run | 2-4 clips | Run forward, run strafe left/right |
| Turns | 2-4 clips (optional) | Turn 90°, turn 180° |
| Starts/Stops | 2-4 clips (optional) | Start from idle, stop to idle |
Animation Requirements
- All clips must use the same rig/skeleton
- Clips should have consistent FPS (30 or 60 recommended)
- Root motion should be baked into the animations
- Motion capture data produces the best results
Import Settings
For each animation clip:
- Select the animation file in Unity
- In the Inspector, set:
- Rig: Humanoid (or Generic if appropriate)
- Root Transform Rotation: Bake Into Pose
- Root Transform Position (Y): Bake Into Pose
- Root Transform Position (XZ): Based Upon → Original
- Click Apply
Step 2: Create the MxM Anim Data Asset
The Anim Data asset is the heart of MxM - it's your pre-processed animation database.
Create the Asset
- Right-click in your Project window
- Create → MxM → Anim Data
- Name it descriptively (e.g.,
PlayerLocomotion_AnimData)
Configure Basic Settings
Select your new Anim Data asset and configure:
General Settings
| Setting | Value | Notes |
|---|---|---|
| Pose Interval | 0.1 seconds | Lower = more poses = smoother but slower |
| Blending Mode | Inertial Blending | Standard for most characters |
Skeleton Configuration
- Click "Configure Skeleton"
- Select key joints for matching:
Minimum Setup: - Hips (root) - Left Foot - Right Foot
Recommended Setup (better quality): - Hips (root) - Left Foot / Right Foot - Left Hand / Right Hand - Head (optional)
- Set Joint Weights:
- Feet: 1.0 (critical for foot placement)
- Hands: 0.7 (important for upper body)
- Hips: 0.8 (critical for root motion)
- Head: 0.5 (less critical)
Trajectory Configuration
Configure how far the system looks ahead:
| Trajectory Point | Time Offset | Recommended Weight |
|---|---|---|
| Point 1 | 0.2s ahead | 1.0 |
| Point 2 | 0.4s ahead | 0.8 |
| Point 3 | 0.6s ahead | 0.6 |
Trajectory Points
More trajectory points = better prediction but slower search. 3 points is a good starting balance.
Step 3: Add Animation Clips
Now add your animation clips to the database:
Create a Composite
Composites group related animations together.
- In your Anim Data asset, click "Add Composite"
- Name it (e.g., "Locomotion")
- Set Type: Standard Composite
Add Clips to Composite
- Click "Add Clips" in the composite section
- Select all your locomotion animation clips
- Click "Add"
Configure Clips
For each clip in the list:
- Review settings - Most defaults are fine
- Tag clips (optional but recommended):
- Add tag
"Walk"to walk clips - Add tag
"Run"to run clips - Add tag
"Idle"to idle clips
Tags are powerful
Tags let you control which animations are available at runtime. For example, you can disable "Run" animations when the character is crouching.
Step 4: Pre-Process the Database
This is where MxM analyzes your animations and builds the searchable database.
Start Processing
- Scroll to the bottom of your Anim Data inspector
- Click "Pre-Process"
- Wait - This can take 5-30 minutes depending on:
- Number of clips
- Clip lengths
- Pose interval setting
- Your computer's performance
What's Happening
During pre-processing, MxM:
- Samples poses at the specified interval (every 0.1s)
- Calculates trajectories for each pose
- Builds feature vectors for fast searching
- Creates acceleration structures (KD-trees)
Processing Time
- 10 clips @ 0.1s interval: ~5 minutes
- 50 clips @ 0.1s interval: ~15-20 minutes
- 100 clips @ 0.05s interval: ~30+ minutes
Go grab coffee - this is a one-time setup!
Verify Success
After processing:
- Green clips: Successfully processed
- Red clips: Errors (check console for details)
- Pose count: Should show total poses extracted
Step 5: Set Up Your Character
Now let's apply MxM to your character in the scene.
Add the Character
- Drag your character into the scene
- Ensure it has an Animator component
- The Animator Controller can be empty or basic
Add MxMAnimator Component
- Select your character in the Hierarchy
- Click Add Component
- Search for "MxMAnimator"
- Click to add
Configure MxMAnimator
In the MxMAnimator component:
References
- Anim Data: Drag your
PlayerLocomotion_AnimDataasset here - Animator: Auto-assigned (or drag your Animator)
- Transform: Auto-assigned (root transform)
Runtime Settings
| Setting | Recommended Value | Description |
|---|---|---|
| Update Mode | Normal | Standard update timing |
| Blend Time | 0.3 seconds | Transition smoothness |
| Playback Speed | 1.0 | Normal speed |
| Search Frequency | Every Frame | Best quality (can optimize later) |
Step 6: Set Up Input and Trajectory
MxM needs to know where the character wants to go.
Add Trajectory Generator
- Select your character
- Click Add Component
- Search for "MxMTrajectoryGenerator"
- Click to add
Create Input Profile
- Right-click in Project window
- Create → MxM → Input Profile
- Name it (e.g.,
PlayerInputProfile)
Configure Input Profile
Select your Input Profile:
- Input Type: Choose based on your project:
- Unity Input System (new Input System)
- Legacy Input Manager (old Input.GetAxis)
-
Custom (scripted input)
-
Movement Bindings:
- Horizontal Axis:
"Horizontal"(A/D or Left/Right) -
Vertical Axis:
"Vertical"(W/S or Up/Down) -
Trajectory Settings:
| Setting | Value | Description |
|---|---|---|
| Max Speed | 5.0 | Maximum movement speed |
| Acceleration | 10.0 | How quickly speed ramps up |
| Responsiveness | 0.8 | Path prediction smoothness |
Link Input to Trajectory Generator
- Select your character
- In MxMTrajectoryGenerator:
- Input Profile: Drag your
PlayerInputProfile - MxM Animator: Drag the MxMAnimator (or auto-link)
Step 7: Test Your Character
Time to see motion matching in action!
Enter Play Mode
- Click Play in Unity
- Use WASD or arrow keys to move
What to Expect
If working correctly: - Character smoothly blends between animations - Movement feels responsive to input - Transitions happen automatically without setup - Foot placement looks natural
If something's wrong: - Character frozen: Check Anim Data is assigned - Jerky movement: Increase Blend Time - No response to input: Verify Input Profile settings - Sliding feet: Re-check root motion settings on clips
Troubleshooting Common Issues
Character Doesn't Move
Check: - Is Anim Data assigned to MxMAnimator? - Is Anim Data fully pre-processed (no red clips)? - Is Input Profile assigned to Trajectory Generator? - Do animation clips have root motion enabled?
Animations Look Jerky
Solutions: - Increase Blend Time (try 0.4-0.5s) - Decrease Pose Interval (more poses = smoother) - Check animation FPS consistency
Character Slides/Doesn't Follow Trajectory
Check: - Root motion settings on animation clips - Trajectory Generator Max Speed matches animation speeds - Character Controller or Rigidbody isn't conflicting
Poor Performance / Low FPS
Optimize: - Increase Pose Interval (fewer poses = faster) - Reduce Trajectory Points - Lower Search Frequency (every 2-3 frames) - Reduce number of joints in skeleton setup
Next Steps
Expand Your Setup
Now that you have basic locomotion working:
- Add more animations - Jumps, attacks, interactions
- Use Tags - Create contextual animation sets
- Create Events - Trigger gameplay events from animations
- Tune quality - Adjust weights and timings
Learn More
- Technical Reference - Deep dive into how MxM works
- Animation Authoring Guide - Optimize your animation content
- User Manual - Complete feature reference
Quick Reference Checklist
Use this checklist for future characters:
- Import animation clips with correct settings
- Create Anim Data asset
- Configure skeleton (joints + weights)
- Configure trajectory points
- Add clips to composite
- Pre-process database (wait for completion)
- Add MxMAnimator to character
- Assign Anim Data reference
- Add MxMTrajectoryGenerator
- Create and assign Input Profile
- Test in Play mode
- Tune blend time and responsiveness
Performance Tips
For Desktop/Console Games
- Pose Interval: 0.05 - 0.1 seconds
- Search Frequency: Every frame
- Trajectory Points: 4-5 points
- Joints: 8-12 joints (full body)
For Mobile Games
- Pose Interval: 0.15 - 0.2 seconds
- Search Frequency: Every 2-3 frames
- Trajectory Points: 2-3 points
- Joints: 4-6 joints (lower body focus)
For VR Games
- Pose Interval: 0.08 - 0.12 seconds
- Search Frequency: Every frame (90fps target)
- Trajectory Points: 3-4 points
- Blend Time: 0.2s (snappier for responsiveness)
You're Ready!
You now have a working motion matching character! Experiment with different settings, add more animations, and explore the advanced features in the Technical Reference.
Additional Resources
- Getting Started Guide - Installation and project setup
- Technical Reference - Architecture and theory
- Original PDFs - Complete original documentation
- GitHub Issues - Report problems or get help