# unity apply item animation to character

I'm trying to change the attack animation of my player in relation to the attack animation for the item he has in his hand.

For example, the default attack animation of my player is puching and once he picked up a sword I want his attack animation to be sword attack, for a hammer a hammer attack, etc ..

I searched a lot on the internet but didn't find much, I saw a few post talking about AnimatorOverrideController but I'm not sure if it's what I need because it overrides every animation clip of the AnimatorController. In my case I just want to change the attack Animation Clip.

So if you cloud give me some tips about the right way to do it, I would really appreciate because I'm a bit confused.

Thanks

Edit : BTW, I'm in Unity 3d

• Is this 2d or 3d? – Stephan Dec 10 '17 at 21:49
• Oh yes sorry, I forgot to specif. It's 3D – Rémi Hirtz Dec 10 '17 at 22:15
• Edit your question to indicate that please – Stephan Dec 10 '17 at 23:34