Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Animator.speed = 1 not returning to "normal speed"

Discussion in 'Animation' started by andrew_ES, Oct 13, 2018.

  1. andrew_ES

    andrew_ES

    Joined:
    Apr 19, 2016
    Posts:
    2
    I'm essentially trying to pause the Animator of a character (so they appear frozen) for a certain amount of time and then resume.

    In searching documentation and the forums, setting Animator.speed to zero and then back to 1.0 (normal speed) in script seemed like the proper solution.

    Setting speed to zero worked perfect, but then when I set speed back to 1.0, the characters were animating too slowly. It seems like I need to set speed to roughly 1.8 in order to get back to "normal speed". I was also storing off the original speed value and then applying it to ensure it was returning to it's original state.

    Any ideas what is causing this?

    I've looked into timeScale (but it's set to 1.0). I've tried with and without blend trees with the same result for both. I've also tried very stripped down characters to make them as simple as possibly and still seeing the issue.

    I'm using 2018.2.8f1
     
    Last edited: Oct 13, 2018
  2. SilentSin

    SilentSin

    Joined:
    Jan 3, 2013
    Posts:
    310
    That's very strange, I would definitely expect 1 to be the default speed.

    You could do this really easily with my Animancer plugin because it gives you more control over everything, but I can't see any reason why what you're already doing wouldn't work.