Hello Stefan,
There’s a few approaches to this, depending on your needs you might need to use only some, or all, of these.
Here’s a high level view:
Using animation blueprints (ABP) is a good way to ensure animation logic can play on two different Skeletal Meshes (SM) at once, even though gameplay abilities only keep one SM reference at a time.
In your hierarchy, you can select your SM and select “use animation blueprint” and assign an ABP.
This way, instead of having all your abilities call their respective animations, the ABP can grab the state of the character and use logic you set up in order to play the right animation.
For the third person mesh, you can grab the player actor by using TryGetPawnOwner in the ABP BeginPlay, and from there determine the player speed, if they’re grounded, etc. These values can then drive the currently playing animaton. You can do the same thing for the first person mesh, and read in the same values.
Using delegates can also help with values that aren’t constantly changing, and only change occasionally.
For example, if your player has an inventory component, you can create a bindable delegate which is called whenever the player swaps which item is in their hands. Then, your first person ABP can bind to the delegate and always have an up-to-date ref to the current item and play the correct animations.
If you want your Gameplay Abilities (GAs) to fire animations on both your 3rd person and 1st person mesh, that can be done as well.
The first person mesh can be accessed within a GA if you:
1. Store an accessible reference to first person SM on your character actor
2. Use GetAvatarActorFromActorInfo to get a reference to your character actor, and then access the SM reference you made.
If you want something really generic, In the GA, you can also get component by tag to grab specifically tagged components.