Search Unity

How to Smooth an Animation After End?

Discussion in 'Editor & General Support' started by marcelobr, Sep 10, 2012.

  1. marcelobr

    marcelobr

    Joined:
    Sep 10, 2012
    Posts:
    12
    when I press forward, and the character makes two steps
    then the animation flicks to another animation "stopped moving"
    I was wondering if anyone know how to apply an animation smooth when it ends :confused:

    See this test:
    http://www.youtube.com/watch?v=-pPS3p3tEF8&feature=youtu.be

    script:
    function Move_animacoes(){
    if(Input.GetKey('d')){
    var blendMode : AnimationBlendMode;

    // repetir a animação
    // animation["frente"].time = 0.5;

    animation["frente"].weight = 1.0; // amortecer a anim
    animation["frente"].speed = 1.0;
    animation["frente"].layer = 9;
    animation.CrossFade("frente");
    animation["frente"].wrapMode = WrapMode.Loop;

    animation["jab"].blendMode = AnimationBlendMode.Additive; //misturar animações
    animation["jab2x"].blendMode = AnimationBlendMode.Additive; //misturar animações
    // animation["gingando"].blendMode = AnimationBlendMode.Additive;

    }else{

    animation["frente"].wrapMode = WrapMode.Once;// parar a animação
    }
    }
     
    Last edited: Sep 10, 2012
  2. wizardious

    wizardious

    Joined:
    Dec 31, 2009
    Posts:
    189
  3. marcelobr

    marcelobr

    Joined:
    Sep 10, 2012
    Posts:
    12
    i get it =D
    thaks brother