Search Unity

More in depth guides on animators

Discussion in 'Animation' started by TheRealAlakeram, Sep 27, 2018.

  1. TheRealAlakeram

    TheRealAlakeram

    Joined:
    Dec 12, 2017
    Posts:
    6
    Hey does anyone know of a good tutorial on animators, I have the basics down but I'm looking for something more advanced, like using a variable to change an animations speed based on the type of creature so like a melee hit will have different speeds based on creature but also has multiple different attack styles (like swipe 1 thru 3 and can combo using swipe 1 and 3 or 1 and 2 etc)

    Any help is greatly appreciated as im stuck on my game because my attack animations feel too fast and I want them to all be based on the creature scriptable object
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    Your only option for changing the speed at runtime when using Mecanim is to set the Animator.speed which will affect all animations. Obviously you can set it back after the attack, but that's still going to be one speed or the other during transitions.

    But, my Animancer plugin gives you full access to everything at runtime, including individual animation speeds. It even includes an AnimancerTransition ScriptableObject which has fields for an AnimationClip, fade duration, and play speed. So your AttackDetails or whatever you've called your ScriptableObject could just inherit from AnimancerTransition and add info about damage, etc.