5
\$\begingroup\$

I'm trying to make a simple idle-walk transition in Animator using Unity. I've set a script that changes the Speed value from the Animator, and it works perfectly when I move the character forward when the game is on.

The transitions work well between both animations, except that they don't start automatically after the speed has changed to greater than zero.

I've found out that it waits until the animation loop gets to it's end, which makes the game feel dull and not fluid at all.


I don't think there's an issue with the code, but I'm attaching it anyway:

#pragma strict
var anim : Animator;

function Start () {
    anim = GetComponent("Animator");
}

function Update () {
    var move : float = Input.GetAxis ("Vertical");
    anim.SetFloat("Speed",move);
    transform.Rotate(0,Input.GetAxis("Horizontal"),0);
    transform.Translate(0,0,(Input.GetAxis("Vertical")*Time.deltaTime*move));
}
\$\endgroup\$
  • 3
    \$\begingroup\$ possible duplicate of Player takes too long to start walking \$\endgroup\$ – Philipp Sep 14 '15 at 13:45
  • \$\begingroup\$ You can decrease the transition time and uncheck has exit time \$\endgroup\$ – Vadim Tatarnikov May 15 '16 at 10:55
  • \$\begingroup\$ It appears to have the same question and the same solution as the question @Philipp referenced, it stands to reason that this is a duplicate. \$\endgroup\$ – user5665 Jul 18 '16 at 6:58
4
\$\begingroup\$

Ok just fix it:

I needed to check off the "Has Exit Time" option of every transition link in order to work fluid.

I hope it help anyone having the same issue

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.