I maked three animations like idle, run and Fire.
I used them by CrossFade, idel and run are perfect now , but Fire animation is impotence when I use CrossFade …
when I use “Play”, Fire animation has to work but it has clear jump .
my script … Thanks
function Start ()
{
animation.wrapMode = WrapMode.Loop;
animation[“idleFire”].wrapMode = WrapMode.Once;
animation[“idleFire”].layer = 1;
animation[“runFire”].wrapMode = WrapMode.Once;
animation[“runFire”].layer = 1;
animation.Stop();
}
function Update () {
if (Mathf.Abs(Input.GetAxis(“Horizontal”)) || Mathf.Abs(Input.GetAxis(“Vertical”)) > 0.1) {
animation.CrossFade(“run”);
if (Input.GetKeyDown (“space”)) {
animation.Play(“runFire”);
}
}
else {
animation.CrossFade(“idle”);
if (Input.GetKeyDown (“space”)) {
animation.Play(“idleFire”);
}