Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Alternative to Stacked Animator Override Controller

Discussion in 'Animation' started by cat_hill, Sep 1, 2023.

  1. cat_hill


    Feb 23, 2023
    I have a very basic Animator Controller which has idle, locomotion, and attack animations. I also use an Animator Override Controller when the character swaps out weapons, which allows me to just simple trigger the same exact attack state regardless of what weapon has been equipped.

    It was all working great until I got some new character assets. They have different idle and locomotion animations. I could use the same trick of an Animator Override Controller, but what happens when you override an override? I think I'd prefer to keep my Override architecture as mutually exclusive instead of stacked.

    I have some familiarity with Layers, haven't used them yet, and not sure that is the right approach for this problem. I'm willing to add more attack states to my state machine if I have to (even if that means a more complex state machine).

    What's a good architecture to meet this general set of requirements?
    • Single Animator Controller for all characters with common state for idle, locomotion, death
    • Different character classes (e.g. human, ogre, dragon, etc) which each have different animations for idle, locomotion, etc.
    • Ability to swap hand held items (and their animations) at run time.
    If the answer is to make a more complex state machine in my base Animator Controller, are there any suggestions for how to simplify it? I didn't see any way to parameterize a trigger for example