Separate animation for different parts of a model

I have a character and I want to have separate animations for the legs and each arm. Also the animations of the arms should be different, depending on which weapon the character is using. How would I go about this?

Legs would be Idle and 6 walkcycles (for moving in one direction while looking in a different one on a hex grid).

Arms would be idle and attack, 3 of each for each arm (3 different weapons possible for right and left arm respectively).

I know how I can separate different parts of the timeline into different animations, but how can I play multiple animations at the same time?

1 Answer

1

i made a system for my character, and it work like this:

i put the leg animations layer to 1
and the arms animations layer to more than 1

in my update function i tell to the animation component play the leg animation i want.

to play the arm animations, i get the animation state and set the transforms i want to be animated. (animation[“animation_name”].AddMixingTransform(the_transform_to_be_animated));

and them i put animation.CrossFade(“animation_name”);

the arms animations will be played over the leg animations, but we are using just the transforms we want to move (the transform you put in the AddMixingTransform() will use all his childs), so the leg animations will not stop playing