Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Different characters/classes animator controller

Discussion in 'Animation' started by M-Elwy, Feb 12, 2021.

  1. M-Elwy


    Jan 28, 2021

    I'm making a game that have 8 characters/classes, they all have common states like: idle, run, jump, block, punch, kick, throw projectile.
    Some states share the same animation like (like run and jump), some have different animation for each character (like punch and kick) which can be handled by creating sync override layer for each character or animation override controller.

    The problem is while 70% of states are the same of all characters, each character has different set of combos, for example:
    Character 1 combo: Punch, Punch, Kick.
    Character 2 combo: Kick, Kick, Punch.

    This can't be solved by using sync override layer because while I can override animation, I can't create different transitions than base layer.

    I though of using one of these solutions:

    Solution #1: Create different controller for each character.
    Drawback: It will be hard to maintain multiple controllers, If I wanted to change a state transition, condition or animation used by all characters(like run and jump), I would repeat it 8 times for each character.

    Solution #2: Having 2 layers "Base Layer" to handle shared states and "Combo Layer" to handle combos.
    Drawback: AFAIK I can't create conditional transition between states in separate layers, for example: throwing projectile can be done from idle state or in combo, If I placed "Throw Projectile" state in "Base Layer", I can't create conditional transition from "Combo Layer", if I placed it in "Combo Layer" I can't create conditional transition from "Base Layer".

    Solution #3: One big animator that handles all characters combos.
    Drawback: It will be messy, and will have the worst performance.

    Appreciate sharing your thoughts/recommendations, or any other solution that will solve the problem with no or little drawbacks.

    Sorry for the long post.
    Thank you.
    Last edited: Feb 12, 2021
  2. Kybernetik


    Jan 3, 2013
    Solution #4: Check out Animancer (link in my signature). It lets you avoid Animator Controllers and control everything in scripts. The Weapons and 3D Game Kit examples demonstrate how easily you can implement a combo system. What you're trying to achieve sounds pretty similar to the way each weapon in the Weapons example has different attacks in its combo.

    Drawbacks: You'll need to spend time learning to use a new system and if your game isn't Sprite based then you will probably need to buy Animancer Pro (though you can try out all the features in the Unity Editor with Animancer Lite before deciding if you want to buy it).