Ever wanted to know how to add Armour to you character that you can swap on the fly? In UNREAL? Now you can!
This is usually called a modular pawn system and quick search online will result in very few example and they are not well explained.
The basic concept:
To create a simple modular pawn we are going to create a character or pawn in unreal. In the blueprint we add the base skeletal mesh. Then we add the Armour which is also skinned to the original skeleton into the scene as well. Finally the armour skeleton is then driven by the base skeleton that is being animated normally.
Step one: Setup and Import
The asset setup is pretty simple. Both the base and armour should be separate meshes skinned to the same skeleton. You then export both as separate fbx files.
Import the base first into unreal as a skeletal mesh. This will generate the skeleton asset that will be used for all your armour. Then import your armour making sure to select the original skeleton from the drop down menu.
Then import a test animation to test the armour.
Step two: Creating the blueprints
First make a new blank character or pawn blueprint. In the viewport add a skeletal mesh. Name is as your base skeleton. In the options select the base skeletal mesh. This should make it appear in the window.
Make a second skeletal mesh this time adding the armour. This should appear and your character should look like they have the armour attached.
Now test is out by putting an animation on the base skeleton. You will see that the armour doesn’t follow along.
Step three: animations & blueprint
To set the armour to slave to the base mesh we have to add some nodes to the event graph of our blueprint. In the even begin play we use the “Set Master Pose Component” so the target is the armour and the Master is the base.
(This will only take effect on game start so the blueprint preview wont reflect the event changes.)
Now we can set the blueprint into our world and the two skeletons will animate in sync
-Lunar Rooster