0
\$\begingroup\$

I'm having a little problem with my animations transitions.

I have this diagram: http://imgur.com/Se8Ix1L

My transitions is made by updating the parameter "stateparam".

My code, changing the parameter: http://imgur.com/HlypG2L

I change stateparam to 2 and right after to 0, then my animation don't restart every frame.

But when I play, the my parameter doesn't change the animation and only change the stateparam to 0. I already debugged and it's passing in the line that change to valid transition value. But i don't know why my animation doesn't changes. If I play and change stateparam manually, it works.

If I take off the SetInteger "0", let only the valid value, the code works, but my animation keep restarting before it can finish itself.

I don't know if the parameter change it's too fast to do the transition or it's any buggy. Any help ?

\$\endgroup\$
0
\$\begingroup\$

Take the anim.SetInteger("stateparam", 0) from SetAnimation() method and put it in the else parts of two if statements in Update()method where you taking input.

\$\endgroup\$
  • \$\begingroup\$ It works, thanks! I'm too many hours learning, i'm getting crazy! hahaha \$\endgroup\$ – Bernardo P. Oliveira Jul 3 '16 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.