- Add a MCRootMotionPawn.
- Set the MCRootMotionPawn’s Skeletal Mesh Component’s Skeletal Mesh.
- Set the MCRootMotionPawn’s Skeletal Mesh Component’s Anim Tree.
- Add Anim Sets to the MCRootMotionPawn’s Skeletal Mesh Component’s AnimSets array.
- Set the Master Slot Node Name to MasterSlotNode’(I will remove this step by making this have a default value).
- Set the Motion Slot Node Name to MotionSlotNode (I will remove this step by making this have a default value).
- Check that the in the AnimTree you are using, the AnimNodeBlendPerBone names match the skeleton bone names
- Open up Kismet and add a Level Loaded event.
- Add a Play Animation action and hook up the Pawn variable link with a Kismet object reference to the MCRootMotionPawn.
- Set the Play Animation’s AnimSequenceName to an animation name stored within one of the Anim Sets I added previously to the MCRootMotionPawn’s Skeletal Mesh Component.
- Before I test, I open up the World Properties and set the Default Game Type and the Game Type For PIE to MCGameInfo.
- Test, you should see the MCRootMotionPawn animating.
14. Check that the root motion pawn’s socket names for the feet are LeftAnkleSocket and RightAnkleSocket
15. Tick Use Ground Tracing.
Set the Translation bone (eg Pelvis). Add two Cached Skel Controls, call them LeftFootControl, RightFootControl
16. Test, you should see the MCRootMotionPawn animating and following the ground surface.
17. Add a Anim Notify event using the “New Event using MCRootMotionPawn_X” context menu in Kismet. (Make sure the MCRootMotion is selected in the viewport)
18. Set the Notify Name in the Anim Notify event to match the Anim Notify object created within the AnimSet.
20. Add a Play Animation and connect this to “Anim Notify”. I set “Play Animation” to play another animation.
21. Repeat the steps 16 to 18 but set it up for another animation. This results in a loop where one animation will trigger the other.
Things to check for in the skeletal mesh and animation sequences:
- Make sure your Skeletal Mesh has a HipSocket and a LeftAnkleSocket and RightAnkleSocket – use these names!!
- The skeletal mesh HipSocket needs the X to point in the correct direction for it to work correctly. X (red) should face forwards, Y (green) should face to the size and Z (blue) should point upwards.
- Animations need to face the X direction, notice how the character for the older Ruth animations all start their animation facing in the X direction? You’ll need to do the same thing here as well; otherwise you’ll get the 90 degree rotation. You can post modify the rotation after you’ve imported by using the AnimSet tool found in
- AnimSequence -> Apply Rotation