Okay so I ALWAYS have this issue with unity and it ruins all of my games. With legacy animations, after a certain amount of animations are added to my model, the CrossFade will only work 50% of the time whereas the other times it just snaps. It's insanely random and if I tap W repeatedly to see my character walk, sometimes it snaps to walk and sometimes it will go smoothly (or snap halfway through).
I am using an animator component and I have a method designed to handle animating:
void AnimationHandler(){
if (action == "None"){
if (moved){
Debug.Log("MOVED");
if (cc.isGrounded){
Debug.Log(cc.isGrounded);
anim.CrossFade("SwordRun");
}else{
anim.CrossFade("Fall");
}
}else{
if (sheathed){
anim.CrossFade("Idle");
}else{
anim.CrossFade("CombatStance");
}
}
}else{
actionTimer--;
if (action == "Sheathing"){
SheathSword();
}
//////////////////
if(actionTimer <= 0){
action = "None";
}
}
}
Does anyone know how to fix this? Is there some sort of convention for animating? Am I not supposed to call the same animation ontop of itself? I have no idea.
Thanks
↧