Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Resolved State machine and animator together. Do I need to execute logic on animator too?

Discussion in 'Animation' started by clovsergames, Jun 7, 2021.

  1. clovsergames

    clovsergames

    Joined:
    Dec 20, 2019
    Posts:
    11
    Hey, thanks for stopping.
    I have a character which states controlled by the state machine. However I set animator up like I would normally do for anything and it's basically a second state machine running on the animator.
    And it feels like I'm doing the same thing twice by setting up transitions and conditions.
    I bet it shouldn't be like this.
    What is the industry standard of doing a character?
     
  2. clovsergames

    clovsergames

    Joined:
    Dec 20, 2019
    Posts:
    11
    Nevermind. I found about crossfade and its exactly what I was hoping for. yay. I have the cleanest animator now
     
  3. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    1,615
    Using CrossFade can save time by not having to set up parameters and transitions and that's how I did it back when I still used Animator Controllers, but it still has notable drawbacks. You don't get to easily preview and tweak the transition times. You still need to define your animation states separate from your script states and then waste time maintaining them throughout development. You still need to use magic strings all over your code. And so on.

    That's why I made Animancer (link in my signature) which lets you avoid Animator Controllers and just do everything in scripts. If you want one of your states to play an animation, you can simply give it an AnimationClip field and tell Animancer to play it. No need to set anything else up beforehand or maintain separate animation data to match up with your scripts, you have full control to do whatever you want upfront.
     
  4. clovsergames

    clovsergames

    Joined:
    Dec 20, 2019
    Posts:
    11
    thats what I'm already doing kinda, I pretty much have my own animator without the graphics. thanks for the offer tho
     
unityunity