Changing the idle animation in a mecanim without making whole new state machine.

I have a character that has a state machine, that jumps, runs, rolls, and all that things of the sort.

I have an idle state which consists of a blend tree with an idle animation while standing still, and running animations depending on the horizontal and vertical input, nothing too complicated.

Now, i have animations that are very similar to this blend tree (running and an idle animation) for each different weapon i have, and i would like to swap them everytime i change my weapon, and do a smooth transition between them. a short one, but at least something not instant, even if it’s not realistic.

The only thing i came up with is, replicating the state machine for each weapon i have as a new layer, however, this seems very inefficent, and moreover, i would load layers for weapons i don’t even have equipped just in case.

Is there any way to make a smooth transition from that blend tree to a new one i can dynamically load without touching the whole machine? since it has a lot of transitions, i can’t really make several blendtress everytime i make a new wepon, else it would be a chaos.

This is a picture of the blend tree.

Inside the idle:

Any ways to get around this?

Have you checked Animator override controller thing?

1 Like