Animate Character and Weapons

Hello guys,

former Unity Hobby developer starting out with UE4 so i hope this wasn’t asked before though i couldn’t find any answers to it.

I have a FPS game based on the Third Person Template with the Animation Starter Pack and everything is working fine though I have now stumbled over a “problem”.
The Starter Pack includes a Reload animation but it obviously doesn’t affect the clip of the gun the character is holding. So i assume i need to create a seperate animation for this.

How would I best go about doing this though to make the clip animation fit to the Character animation? A similar problem will probably come up as soon as i introduce some more oddly shaped weapons which may need different idle,Reload, … animations. So how would i best animate the character and the weapon while in the end still having seperate models and each having their own animation sequenze?

I once read in an old UDK documentation about putting both models in one scene, animation both together and then exporting them seperatly but it hasn’t really been explained well, especially the exporting part and i wonder if there might be a better way in UE4. For creating Idle animations adding preview assets might be enough but what to do for the other way around.

Hello,

The main tool for this is going to be the skeleton asset. As long as your skeletons share the same hierarchy bone names you can use the same animations on them. In order to account for size changes or other variations you use the animation re-targeting tools in persona. This can also allow you to use different skeletons as well, just a bit more tricky. best to plan ahead. You can easily set up their animations separately and share across the board. I have given a set of links below that will lead you in the right direction. Any further questions, or if I missed something, let us know. The third is a great series by epic where I learned all of this.

did any of these important question ever get a answer? im looking now for hours on this answerhub but all question about this are not get any answer …unanswered since 2015…epic…

What you need is “SetMasterPoseComponent”, ALL THE ANIMATIONS are based on the character.
But you need a special character skeleton that has the weapon part

226561-内网通截图20180110145658.png

and the weapon skeleton bones like this

226562-内网通截图20180110145754.png

so,when you attach your weapon to the character, you should do something like
WeaponSkeleton->SetMasterPoseComponent(CharacterSkeleton);

then your weapon will AUTOMATICALLY set to the right position and animate with your character.

Thank you very much, I appreciate that very much and that helps me a lot