Basically I want to play two animation simultaneously but I can't able to find any way for it using Animation Controller.
At present I have working animation in sequence but not playing parallel. If you have any other way of playing animation in other way rather than using animation controller then please guide for it also.
So please give some information regarding this.
Answer by siddharth3322
Jul 05, 2014 at 03:59 PM
Now I have work out my problem and find solution for it and here I post it to help other members.
First I want to say that this solution it totally based on my knowledge but now it is working properly.
For playing two animation, you have to create two layers for you same game object for which you want to apply animation.
Here for example, my first layer contains animation for sprite animation and in second layer contains rotation animation.
In first layer you have to create animation normally as you normally create for second animation you have to create another animation state here, not attached with any other state. My this point stated in following image.
Now you have to add other layer with weight of 1 and named it as you like.
Next you have to work for second layer, I have named it Death layer.
For this you have to create empty state named Idle and create transition for your rotation animation. Here based on game over flag I am playing Death animation. Following image represent content of my second layer.
To play actual animation you have to write following code
If you want any other help in this subject then ask me any time.
Hi just wondering if you had figured out how to play more than 2 or more animations based on layer masks, e.g left hand wave, right hand wave and running. all 3 different animations.
Thank you this worked for me. My gameobject did not have any skinning or bones, it was straight keyframe animations, and it worked for me too. Making another layer was the answer.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
25 People are following this question.
Unity 2d animation acting strange
How can I animate 2d sprite rotation without interpolation?
How should I set up 2D animations for weapons in Unity?
Custom Pivot Points in Sprite Editor
A node in a childnode?