Hi everyone .
I have two piece of animation clips ,each of them last 1 second.when i use crossfade function to change the animation like this
GetComponent().CrossFade(roll.animation.name);
if(GetComponent()[roll.animation.name].normalizedTime > 0.95f){
controller.isRoll = false;
animationState = Run;
}else{
controller.isRoll = true;
}
this charactor will roll forever.when i change that into
GetComponent().CrossFade(roll.animation.name,0.05f);
if(GetComponent()[roll.animation.name].normalizedTime > 0.95f){
controller.isRoll = false;
animationState = Run;
}else{
controller.isRoll = true;
}
It works well .
Can anyone tell me the reason? THX.