Hi.
I met some new problems.
Please see this video. (problem3)
Problems are,
-
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) -
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);
}
}