Search Unity

State transition speed effected by blend tree?

Discussion in 'Animation' started by angrypenguin, Jan 1, 2014.

  1. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I've got a pretty simple Mechanim controller set up.

    I have a "Standing" state with a blend tree from Idle to Walk to Run based on a float "walkSpeed". All of the motions have a speed of 1 and thresholds based on Z velocity. I have another "Jumping" state with a simple jumping loop. I have a bool set up to transition between these.

    It mostly works as expected.

    When walkSpeed is 0 or a very low number the transition behaves as I've set it up. It takes about 0.2 seconds and is pretty smooth. However, the higher walkSpeed gets the faster the transition plays, and this is causing problems. Even at normal walking speed the transition is so fast that it is effectively a snap rather than a crossfade.

    If I make the transition longer then it's too slow when the character is standing still.

    So, where can I control how the blend tree effects the transition? I don't want it to effect the transition at all - I just want it to take a flat 0.2 of a seconds.