Search Unity

Slow down speed for entire animation controller

Discussion in 'Animation' started by joshcamas, Aug 3, 2021.

  1. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,277
    Is there a simple way to slow down an animation controller?
    I know one option is to plug a speed variable into all of the states in the entire controller, but this seems kinda silly and also doesn't affect transitions.
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    When you're using Animator Controllers normally, you can just set the Animator.speed.

    It's only the Playables API that doesn't seem to have a way to do it.
     
  3. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,277
    Doesn't the animator controller use playables under the hood? I wonder what Animator.speed does then...
     
  4. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    It definitely does because the Playable Graph Visualiser works on it, but there are a few weird things like this where the behaviour is inexplicably different.

    Try calling animancer.Playable.PauseGraph() then in Update call animancer.Evaluate(Time.deltaTime * speed). That could be how Animator.speed does it.