animation help

I have a character model and a weapon model, i wanted to know how to animate my character with the weapon so I could use it in unity. I know how to animate but i dont see how i can link the two together in unity. Because i guess i have to bring them seperatly in unity because i dont use them all at the same time. Thanks and fill free to ask if my question isnt clear.

Try parenting the character to the gun in the hands.

From Unity ? and if so how to animate my gun and the model so they do the same thing and so it doesnt look funny. Thanks

You can parent any object to any other object in Unity by dragging and dropping. (you can also do it with scripts to dynamically attach and detach things)

If you parent a weapon to your model’s hand but it’s not lined up correctly, try zeroing the weapon’s transform and rotation.

This way the gun isn’t animating at all - it’s just inheriting it’s position from the characters hand, which is animating along with the rest of the character.

Ok thanks and when the hand is moving for exemple when i want to recharge how can i make the clip follow the hand and put it back in. and pull on the gun to reload. Thanks

If the gun has animated components (like bolts and clips for reloading) and you’re keeping the character and weapon separate, what you’ll want to do is make separate animations for the weapon, then run them with a script at the appropriate time. (I say separate, although you’d likely animate them together in your 3D package, then just export them separately)

For instance, you might make a “reload” animation for the character that lasts 2 seconds. Make a “reload” animation for the gun that also lasts 2 seconds (and is in sync) then when you reload in game you run the animation on both the player and the gun object.