Animation problem, Direction problem (youtube)

Hi.
I met some new problems.

Please see this video. (problem3)

Problems are,

  1. Why the character facing back when click [w] to go to forward?
    (black character is looked facing correctly, but I make empty object and parenting it and change direction forcifully)

  2. Animation looks broken between 1 loop of [idle] and [run] animation.
    How can I change they looked smoothly connected between 1 loop (e.g. between idle and idle)?

I used this animation code.

function Start ()
{
    animation.wrapMode = WrapMode.Loop;
	 
}


function Update ()
{
    if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.1)
	{   
	    animation.CrossFade("run",.6);
		 
    }
     else
    {
      animation.CrossFade("idle", .5);
	}
}

For the running backwards problem, I would go into your 3d app, turn your character 180 degrees, and re-export.

For the Idle animation jumping problem, make sure the first and last frame of the animation are exactly the same position. That’s how to get smooth looping.