This tutorial will explain how to set up animations in Mannequin.
- Open the Sandbox Editor and open a new or existing level that you want to check your character in;
- Open the Mannequin Editor by going to Tools → Animation → Mannequin Editor;
Anchor AssignAnim AssignAnim
- In the Mannequin Editor, go to File → Load Preview Setup..., navigate to Animations → Mannequin → Preview and open Player.xml;
- In the Fragment Editor, you should see your character in T-pose:
Loaded character in T-pose
- In the Fragments panel, expand all options under Idle and double-click on Option 1:
Idle Option 1
- In the bottom right, there are two Animation Layers, one for First Person (FirstPerson(FirstPerson)) and one for Third Person (ThirdPerson(ThirdPerson)), both with an animation already set up for them:
Animation Layers for Idle fragment
As this tutorial assumes you're doing a third-person project, click on the Animation Layer for ThirdPerson (the colored bar), then click on Animation in the Anim Clip Properties, click on the browse button on the right and choose the walk animation for your character;
- As this is an animation that needs to keep playing the whole time the character is standing still, enable Looping in the Anim Clip Properties;
Repeat these steps for your Walk animation under Walk → <default> → Option 1, and Looping and Time Warping;
If you have a blend space (see previous tutorial), choose the blend space instead of the walk animation.
For more variation in for example your Idle animations, you can set up multiple animation clips for the same situation.
1. In the Fragments panel, select the <default> folder for the Idle or Walk animations (depending on where you want to add an animation clip);
2. Click New at the bottom of the panel;
3. A new Option will appear under the <default> folder. Repeat steps 3 and 4 to add another animation clip. The Engine will automatically choose between the two animation clips when the character is Idle or Walking, depending on where you added the animation clip.
NOTE: You may have to add an Animation Layer in the bottom right. You do this by right-clicking on the ThirdPerson(ThirdPerson) text and choosing Add Layer → Animation Layer.
- Save all your changes by going to File → Save Changes.
- Jump into the game with Ctrl + G and check your animations by walking around with your character.