my code
if(istherunkeyshift == true && istheupparrowused == true){
animator.CrossFadeInFixedTime(thewalkcyclenancyfaster,0.2f);
Vector3 destination = transform.position + transform.right * input.x + transform.forward * input.y;
navMeshAgent.destination = destination;
}
Hi,
I had the same issue.
It seems CrossFadeInFixedTime() can’t be called several times. (e.g. in Update/Coroutines/loops/etc.)
Each time CrossFadeInFixedTime() is called, it will start the animation again at the first frame.
It has to be called once.
I solved it with a check before the call:
void Update()
{
if (anim.GetCurrentAnimatorStateInfo(0).IsName("Run"))
{
return;
}
anim.CrossFadeInFixedTime("Run", 0.1f);
}