Question about first person animation


I have been wondering for quite some time now about how to animate first person weapons and such with the “Epic skeleton”. As far as I understand you are supposed to attach the weapon mesh/skeleton to the “WeaponPoint” sockets. But now I wonder how do I get the weapon to animate? Do I simply play two animations at once, one for the weapon and one for the arms/body)?. And what about reload animations, how do I get the magazine to follow the hands and such? That might be a Maya related question though.

If I were you, I’d check out the ShooterGame. It’s a C++ project, but the general approach is the same regardless of whether you’re using BP or C++.

Essentially, yes, you parent a skeletal mesh to the socket, and you have animations on the gun mesh. Usually, you wouldn’t just attach a bare mesh, you’d create a weapon object that’s a subclass of AActor with a USkeletalMeshComponent. You might then have subclasses for different weapons or different types of weapons with different properties, animations, etc…

For your character’s inventory, you could store an array of weapons, and when you set the active weapon, you attack the weapon’s skeletal mesh to the character’s weapon socket.

Here’s a video tutorial (might be a bit outdated now) that shows how to add a weapon to the FPS template:

Haven’t watched it, but the videos from that guy are usually pretty good.

Just to add a +1 to what Jeff was saying. Have a look at the setup in shootergame as an example. You have THREE skeletal mesh objects. One is the third person player skeleton, the other is the first person arms mesh, the third is the weapon mesh itself. Weapon gets parented to the arms, which are set to only show in first person. Everyone else in the game sees the third person mesh with the correct weapon attached.

It gets a little complicated because you have to synchronize all those animation blueprints to do the correct things (firing anims on all three for example).

Thanks for the answers!

Now I am wondering about how to animate them in Maya if I use this system. Do I simply attach the weapon (with skeleton) to the WeaponJoint in Maya and start animating the weapons and arms and export them separately? If I do that, won’t I have a problem with the magazine offsetting itself during reload when it’s attached to the WeaponSocket?