I have this simple code here… the Var doesn’t switch at the end of the animation… i even set the animtion Loop Off and On still doesnt work
var LandPhase=true;
function Update(){
BodyAnim=TheBody.GetComponent.<Animator>();
if(!LandPhase){BodyAnim.Play('jump_20_c');LandPhase=true;}¨
if(LandPhase&&!BodyAnim.GetCurrentAnimatorStateInfo(0).IsName("jump_20_c")){LandPhase=false;}¨
}
And this too…
var LandPhase=true;
function Update(){
BodyAnim=TheBody.GetComponent.<Animator>();
if(!LandPhase){BodyAnim.Play('jump_20_c');LandPhase=true;}¨
if(LandPhase&&BodyAnim.GetCurrentAnimatorStateInfo(0).IsName("jump_20_c")){LandPhase=false;}¨
}