- Home /
Mecanim transitions for sprite prefabs
I am having trouble understanding how to use the animator. I have a bunch of prefabs that have animated sprite components and I want to achieve two things. First, I would like to be able to transition to another sprite animation. I need to play these animations from the first frame every time. Secondly, I would like to use the animation controls in unity to do something simple like play one of these sprite animations with a reverse x scale, i.e. flipped. I've tried to apply an animation control to a sprite prefab from a higher hierarchical level with limited success. Any time I try to do this the animator either transitions unexpectedly, starts playing animations from somewhere after the beginning and/or enters two states simultaneously. To illustrate with an example, I have a animated sprite of a dolphin jumping out of the water. I need this sprite to play with normal scale when traveling right and flipped x scale when traveling left. I also want to have the dolphin alternate between jumping right and left when the prefab is not moving. Whenever I try to set up the state machine in the animator I end up with the jumping animation transitioning when the dolphin is in mid-air. Can anyone diagnose the problem I'm having? Thanks!
Your answer
Follow this Question
Related Questions
Create animation transitions via script. 0 Answers
How to make animation transition to any other animation? 0 Answers
2D Animation does not start 1 Answer
Animator switches animation without trigger 0 Answers
Root motion accuracy issue 0 Answers