Primary Data Asset Creation
This part may seem overwhelming, most of these assets though are just Copy/Paste or simply shared between characters, so don't feel to offput by all of this.
Last updated
This part may seem overwhelming, most of these assets though are just Copy/Paste or simply shared between characters, so don't feel to offput by all of this.
Last updated
First we will create the Primary Data Assets that will be used for loading the Data for our Characters during Run-Time. I will place mine in a Sub-Folder under the HeldObjects folder of the UE5_Manny since that will be the character I will be setting this up for. I will also simply be copying the M4A1 assets into this folder since the 2 are similar and I will just be using the same Animation Pose Set for this Rifle rather then making custom ones for it. I will show you how to do that later though. Right click again and create another Data Asset. Create a PDA_HeldObjectSettings asset; This will Store all the Settings and make them a bit easier to get too.
Create a PDA_HeldObjectOffset asset; This will be used to adjust the how the weapon is held in the hand. Create 2 PDA_LiveRetargeting asset; These will allow us to adjust the aiming and hand placement of the character for that specific weapon. Create 1 PDA_ItemCharData asset; This will store all of the PDA_HeldObjectSettings, a PDA_LinkedAnimSet (This stores the Poses and Layering Settings for those Poses), and other information regarding montages and if a free hand is required for this item. You may choose to follow this naming convention if you wish. HOO = HeldObjectOffset = PDA_HeldObjectOffset HOS = HeldObjectSettings = PDA_HeldObjectSettings LR = LiveRetargeting = PDA_LiveRetargeting ICD = ItemCharData = PDA_ItemCharData (For these I simply didn't include any specifier but feel free to do this if you feel it makes them easier to identify) If you copied the M4A1 settings like I did then search for DA in the new folder and this should pull up all the assets you just copied. Select them and right click and choose Batch Rename or press Shift+F2. Search for M4A1 and replace it with your items name, for me it was M1A1. If you copied these like me it's important that you rename them so that you can identify and distinguish them. After I copy it I make sure the IK Retarget Data has been set to the one I want to be used for this character. I will also have to replace the references for the sub containers. For the PDA_HeldObjectSettings, I need to replace those references as well. I will still be using the Same Linked Anim Layer Class and Montages for this item, I also want it to require a free hand so that other items such as flashlights can not be equipped alongside it. Under my Character Blueprint I will be copying the Character Tag for my Character, if you haven't created one yet then you can simply add a gameplay tag for your Character now. You will need this tag in order to retrieve the character's IK Settings for this item. In the Chooser assigned to your weapon you may need to add a gameplay tag for your character. You could use the Parent Tags of your Character Tag to Identify the Correct Category as I have. For example, MH.Med MH.Med.NW for Normal Weight And then finally MH.Med.NW.M which stores the actual PDA_ItemCharData Asset for that character. When this item is equipped the Character will Link the Anim Layer, Pass the Linked Anim Layer the PDA_LinkedAnimSet where it will then load the appropriate pose and update the Layering Settings for that pose. It will then inform the Item as to which hand it's being stored in, this allows me to expand this later so that we can have specific montages played for firing/reloading/equip/unequip based on what hand the item is being held in.