Most efficient way to switch between multiple animations

I am working on a character creator where the user has the option to switch between a few animations. These animations are controlled by a button menu, so the user simply clicks a button (ex. Idle 1) and the Idle 1 animation plays. I was doing this by using the Play Animation node connected to the button event, which worked for my purposes at the time. However, I’ve since added head tracking to my character, so now the animations must be set inside the Animation Blueprint, otherwise the head tracking won’t function due to it using a layered blend per bone node:

So, I created a state machine to contain all of the idle animations the user will switch between. The user must be able to switch to any animation regardless of the currently selected animation, which means I would have to set up transition rules to and from every animation, which seems way too convoluted and so I am assuming this is not the correct way to do it.

Is there an easier way for me to set this up, so that the user can simply click the button and have that animation play, without having to add a million transition rules?

I am a UE nub so apologies if there is an obvious solution, there are plenty of animation tutorials but they are mostly for character movement which is not what I’m trying to do in this instance.

You can set the animation by just using a variable in the input:

1 Like