Character Blueprint Implementation

In this section I will cover the aspects of the Character Blueprint which is responsible for updating information

The two functions your really calling when you update the Character Blueprint are going to be Update Both Items in Hands, and Update An Item in Hand. One simply requires my struct to be used, which stores an Actor Reference for each hand, I later call my Blueprint Interface function on these Actor References to obtain the PDA_ItemCharData Required.

These functions will Update the Item References stored in the ItemsInHand variable, and the HeldObjectState which keeps track of the ItemID for each hand. (I will likely refactor this soon so that the ItemsInHand store both the Actor Reference and the ItemID, since we need to update both of these together)

The HeldObject State has an OnRepNotify Event which when fired, will have everybody on the server update the Animation Layering Data. This is where the PDA_ItemCharData will be currently fetched from the items, the linked animation layer will be loaded, the poses will be injected, the Aimoffset will be setup, and the layering settings will be blended in.

The HeldObjectStance will keep track of the Linked Anim Layer State we are in, it's value is updated by the Linked Anim Layers. This logic is only really required for Live Retargeting.

The Stance is used to lookup Live Retargeting Chain Settings which are Stance Specific, and change depending on the Stance we are in, this is because Live Retargeting Offsets are usually Pose Dependent, and an offset in one pose will likely not look right in another pose. This approach is hacky, but gives those who do not have the time or desire to create custom sets, to simply correct offsets without modifying poses. It also allows people to more easily reuse animation sets, between multiple characters, where the anatomy differs slightly, without making a new set, the ability to correct Minor offsets. The last approach could help streamline their system, keep in mind live retargeting does have a cost.

To finish this off, we have 4 Events you can call for various purposes, I am currently not using the I_ClearItemsFromHand event. Instead, to clear an item, I am simply calling the other events and passing in empty references, which will cause the Unarmed Linked Anim Layer to be updated.

The Unarmed Linked Anim Layer is chosen if no items are being held in the ItemsInHand, if that is the case, the OnRepNotify for the HeldObjectState will simply see that not items are being referenced in the ItemsInHand, when it gets updated, and the DefaultOverlayData will be called. The DefaultOverlayData is a PDA_ItemCharData Asset, which stores Unarmed Animation Layering Data. The Unarmed Animation Data will be loaded just like normal. Live Retargeted Characters have these assets assigned from the Class Defaults. (As of now the UEFN Unarmed Set is not applied, because the Poses for that character were not made for that Unarmed Pose, and if the poses do not match, it can cause odd blending issues regarding pelvis offsets, I will likely re-introduce that later when I have more time to sit down and correct the poses to fix this issue.)

Last updated