- Home /
2D Animator - how to script animations?
So recently I discovered this ANIMATOR tool, and the 2D sprites and decided I should try and learn more because of how useful it is to me, since I've been doing the frame animations by hand. So far, even though I have no clue what I'm doing, the results are spectacular. Now my question is:
I have a ship, I want it to have several animations, one for firing, one for flight, one for launching mini ships, and the final for death. I have all the animations in unity, created with the sprite splice tool (whatever its called.) My ship defaults to the flight animation which is fine, that's how I want it. Now when I try to call another animation, it either doesn't work at all, or when it DOES work, its wrong. For example, when I had my firing animation working, it wouldn't return back to the flight animation.
Basically, can I have some tips/pointers, links to tutorials that you guys may know of (I have no idea where to look) that cover these things? What is the proper way to call the animations in a script (javascript)? I am using this and it's not working at all atm:
anim.SetBool("Firing", firing);
where firing is declared true when the ship fires, and Firing is the animator transition.
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
Animation.Blend with Animator? 0 Answers
Animation Events and Mecanim 0 Answers
What is the proper way to wait for an Animator Controller to update? 1 Answer
Animation stops rotation 0 Answers