Animation in a Third Person Template
The standard BP_ThirdPersonCharacter is not ready to play user-generated emotes yet. To do so, we will need to modify its Blueprint and its AnimBlueprint.
The Skeletal Meshes
Open the BP_ThirdPersonCharacter
Inside the new opened window, add a SkeletalMesh and call it "SkeletalMeshTarget".
Attach it to the inherited "Mesh (CharacterMesh0)"
Due to the fact that "Mesh (CharacterMesh0)" is inherited from Character class, we need to copy its values (except the transform ones) into the newly added "SkeletalMeshTarget"
Replace the values of "Mesh (CharacterMesh0)" with
Add a "KinetixCharacterComponent" and a "AnimSequenceSamplerComponent" to the ThirdPersonTemplate in Components > Add.
Open the Animation Blueprint "ABP_Manny" in Content Drawer > Animations.
Click on "Class Settings"
Inside the "Interfaces" section. Add the "KinetixAnimationInterface" to it.
With this interface comes 1 function and 1 event, implement them by double clicking on each one.
Keep the result of the event "SetKinetixAnimationPlaying" in a variable:
In "IsKinetixAnimationPlaying", return the "PlayingEmote" variable:
In the "AnimGraph", add a CachePose (we called it here "GameplayPose") after the ControlRig Anim Node:
Add a "Blend Poses By bool" node, connect the "PlayingEmote" boolean value to its "Active Value". Add a "Retarget Pose From Mesh" node, connect it to its "True Pose". Add a "Use cached pose "GameplayPose" node and connect it to its "False Pose". Finally, connect the output of the "Blend Poses by bool" to the global "Output Pose" node:
Click on the "Retarget Pose From Mesh" node and set the "IK_Retargeter Asset" value to "RTG_SamRokoko_To_Manny":
Finally, you can now use this circuit to register your local pawn as the local player avatar:
The BP_ThirdPersonCharacter is ready to play Kinetix Emotes!
Last updated