I’m looking for a way to optimize this kind of transition:
Basically, in this case every state is connected to every other state, and for each state, entry condition is the same on all inbound transitions.
I’d like to have a way to reduce number of duplicate transitions.
I’ve tried this:
However, it doesn’t work. “Any State” is reentrant, and is being triggered repeatedly as long as corresponding boolean flag is set. This does not work the way I want.
I contemplated using an empty animation node, but as far as I know, it interrupts transitions, and another problem is that transition conditions are specified as “A and B and C”, but to create an EXIT transition I’d need NOT and OR operations (meaning “not A or not B or not C” → !A || !B || !C)
What are my options?
If I remember it correctly, Unreal 4 had “routing node” in its animation system for this kind of scenario. Is there anything similar?
I dont want to make lite of this issue as I believe any state could be less restrictive for scenarios exactly like this.
It seems like the default should be the “idle” in the middle where anystate is in the first image.
And the states on the outside would be set up similar to the second image but always returning back to default/idle if no other transition condition is met.
Will that work?
second image rather than first.
It won’t work, because there will not be a smooth transition equivalent to the first diamond image.
In addition to that there’s a problem with reversing condition like “A && B && C” to create “exit” transition. The opposite of “A && B && C” is “!A || !B || !C”. State machines - in unity - do not have ! and || operators. Meaning I’ll need to change control scheme to one bool per transition.
In the end I bypassed state machines entirely, and wrote an a controller for animator that uses crossfade to jump between states.

I’m not very happy with this approach, but it works.
1 Like