Mecanim 1 frame delay [solved]

all animations are facing right, when i change character direction the turn animation faces one way after turn, in the same update i flip change transform:

transform.localScale = new Vector3(1f, 1f,0.001f);


transform.localScale = new Vector3(-1f, 1f,0.001f);

i am calling flip and new animation on the same frame / update and i can see one frame glitch, where animation is not changed but character is already flipped

what can i do? is there some delay in mecanim?

**EDIT: it was all wrong since beginning, when i changed movement from adding Vector3 every frame to current position to Vector3.Lerp() between start and end the problem dissapeared completely

sorry for bothering and thanks for trying to help

I use

yield WaitForSeconds(0);

As in

	_animator.SetBool( paramName, true );
	yield WaitForSeconds(0);
	_animator.SetBool( paramName, false );

I have no answer but the same problem currently.
Every transition in mecanim have a 1 frame delay

frame 1 : the parameter is checked

frame 2 : the state is activated

frame 3 : the animation in the state is played

( so it’s 2 frames in reality )

I’m curious how everyone is dealing with that since it has a big impact on how well the game responding to your inputs :confused: