Basic Animation FPS Questions

So I have some basic questions as to how exactly the best ways to import different animations regarding a first person. They all deal with the guns, holding of different weapons etc.

Programs being used:

Autodesk Maya

We have one character model, the model has a working IK and FK rig. I understand that Maya uses .FBX files for it’s animations, and that we have to bake the animations into the mesh before importing into Unity.

Now I’m wondering how the best way to go about animating guns with the character is. In Maya should I create a bone for the gun, then animate him say walking, and when I export the animation will it save the information in the FBX of the gun bone offset? From there is it just scripting to attach the gun to the characters hand.

Also eventually the game will have multiple guns, and each gun will have a different way the character holds it. If I’m doing a jump animation, do I have to make a separate jump animation for each gun, or is there a way to blend the top portion of an fbx with the bottom. Or would I make a stationary upper body animation, and an animation where the bottom of the body moves for jumping, then layer them together?

The main issue though if you only answer one, is how can you animate the gun and character model in Maya, then when importing the animation make it extremely easy to attach the gun to the mesh so it looks exactly how it did in Maya.

Thank you

Hi Presipope,

When you export your FBX animation all bones that are animated will be saved out and animate inside of Unity. You can attach the objects you want to the bones inside of Unity by simple parenting and it will follow the animation. You can also set up an empty game object thats positioned where the gun would be instead of the gun itself and attach a gunManager script that can switch between weapons.

I was watching a Unite10 video where the speaker talks about how he split his boxer skeleton into 2 and shows how he basically blends 2 skeleton animations for the top and bottom half of the body, heres a link: (click on "Character Animation Workflows in Unity)

As long as the gun is imported and placed in exactly the same place it would look like it does in Maya :slight_smile:

Hope that answers your question, cheers!