Unreal Engine 5 Character Animation
✍ Last Updated : September 6, 2022
🚪 Prerequisite Knowledge (Optional)
Know how to create and having Unreal Engine Project.
❓ Key Question / Problem / Issue
- How to add animation to character from scratch?
- How to add input to trigger animation changes?
✅ Expected Output/Definition of Done
- Adding animation to character from scratch
- Adding input to trigger animation changes
🎁 Resulting Solution
Create / Add Character
If you have your own character and animations, you can just simply drag it all to ContentBrowser. But if you not, we can use character & animation assets from Lyra Sample Game from Epic Games marketplace.
If you already have it. Let’s migrate character and animation assets to our own project.
-
Migrate Character Mesh
Open LyraStarterGame project, at ContentBrowser go to
Content>Characters>Heroes>Mannequin>Meshes
right-click on SKM_Quinn / SKM_Manny (character mesh), go to Asset Actions → Migrate.At Asset Report dialog, you can disable unused Asset List, just like image below.
Click OK buttons, choose Content folder at your Unreal Project as a migrate destination, and there would be a popup toast ‘Content migration completed successfully!’ at your bottom-left side.
-
Migrate Character Animation
After we get character mesh, we also need character animation, we can migrate it from LyraStarterGame project just like we migrate the character mesh.
Open LyraStarterGame project, at ContentBrowser go to
Content>Characters>Heroes>Mannequin>Animations
select Actions, AimOffsets and Locomotion folder. Right-click and select Migrate.At Asset Report dialog, you can disable unused Asset List, just like image below.
We only need Actions, AimOffsets and Locomotion folder and uncheck the rest.
Click OK buttons, choose Content folder at your Unreal Project as a migrate destination, and there would be a popup toast ‘Content migration completed successfully!’ at your bottom-left side.
Create Character Blueprint
After migrate Character Mesh, we can use the mesh for creating a character blueprint.
At Content folder / anywhere in Content Browser, Right click → Blueprint Class. Select Character.
Name it BP_Hero_Quin because we will use Quinn assets from Lyra as a blueprint mesh. Open the blueprint file. At the Mesh (CharacterMeshComponent), change the Mesh with SKM_Quinn.
Then add new Components “SpringArm” & “Camera”, SpringArm is used to maintain camera to keep follow your character and will automatically be a parent of your Camera component.
Setup Input Axis Mapping
Let’s set input axis mapping for character movement, open Edit > Project Setting. Go to Engine > Input, at Axis Mappings, add key mapping like image below.
Add Input in Character Blueprint Event Graph
After character mesh and input axis is ready, open character blueprint, go to Event Graph to add character movement from input.
No Comments