Search Unity

Animation blend tree takes 2-5 seconds to start once I play a scene.

Discussion in 'Animation' started by Strom_CL, Oct 7, 2013.

  1. Strom_CL

    Strom_CL

    Joined:
    Nov 17, 2012
    Posts:
    115
    I have a model with an Idle animation set as her default state, she idles when the scene loads, this works fine. I have a Blend Tree transition that has a Speed parameter that says:

    Code (csharp):
    1. Motion     Threshold    Speed
    2. 1. Idle         0         1
    3. 2. Walk         8         1
    4. 3. Run         16         1
    5.  
    When her speed is 8 she walks, if its 16 she animates as running, and if shes standing still she idles, everything works fine...2-5 seconds after the scene loads.

    As soon as I hit play shes in her default idle state and if i walk around shes in idle for a few seconds and then she'll start walking like normal. I have the PlayerAnim.GetFloat("Speed") printing out in a GUI.Label so I can see the variable, and its 8 as soon as I start walking but she remains in her Idle animation state for a few seconds. I have NPC's using a similar setup and they work pretty well, they fall into the scene in the "default" muscle pose then start walking about a quarter second later. (Wish they'd drop in as the Idle animation, but that won't work either)

    Anyone know why the animation takes so long to "kick in" like it is? I only have the one animator on the player model as well.
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Do you also have a separate Idle state that she starts in? Maybe the transition to your blend tree has an "Exit Time" condition.