Unity Animator Integration
The package provides a seamless way to integrate Unity's built-in animation system with Motion Matching. This allows you to blend between the poses produced by Unity's Animator
component and those generated by Motion Matching.
Example
Refer to the sample for a hands-on guide on integrating Motion Matching with Unity's Animator
component.
Overview
The Animator
component in Unity allows for a complex arrangement of animation clips, transitions, and layers. Since the Animator
is not easily extendable, this project processes poses separately. The MotionMatchingSkinnedMeshRenderer
component bridges the two systems by offering an easy way to blend and mask joints.
Animator Integration Options
In the MotionMatchingSkinnedMeshRenderer
component, you'll find an Animator Integration section with the following fields:
Field | Description |
---|---|
Avatar Mask | Specifies which of Unity's humanoid joints will be animated by the Motion Matching system. Set to none to animate all joints. |
Root Positions Mask | If enabled, Motion Matching will handle character movement. |
Root Rotations Mask | If enabled, Motion Matching will handle character rotation. |
Blend Poses | Activate this to enable inertialize blending, mitigating abrupt pose changes. |
Blend Half Life | Adjust this to change the blending speed. Represents the time needed to cover half the distance from the source to the target pose. |
Any change in settings, like modifying the Avatar Mask, will trigger an automatic blending using custom inertialization.
Tip
Feel free to exchange the Avatar Mask in the MotionMatchingSkinnedMeshRenderer
component at runtime. Poses will automatically blend according to your new settings.
Creating an Avatar Mask
To create an Avatar Mask:
- Right-click in the Unity Project window.
- Select
Create/MotionMatching/AvatarMaskData
.
Created: 2023-11-10