I am working on a jump --> fall --> land system. I want to determine when my landing animation has finished so that I can set my "landing" boolean to false. Here is the simple code:
As you can see, the landing animation is set to play once. I have commented out the boolean because otherwise it fires before the animation finishes. I have tried using !animation.isPlaying but it wasn't working. Is there another way? Or maybe I haven't set up the isPlaying correctly.
you are doing it right but seems like it is the problem of crossfading continuously inside the if loop, meaning the animation stays for ever!! change the code a bit it will be fine
I hope this would work and also please bare me, if it has some typo, i couldnot test the code rite now!!
answered Feb 11 '12 at 02:14 PM