- Home /
Unity Mecanim Play two animations [UPDATED]
How do I play two (or more) different animations at once in the animator?
I have an animation control that can play one single animation at a time but im unsure how i would go about making it play two animations. I would use code but for some reason im unable to get the animations playable. This will idealy be used for shouting while walking for example.
Thanks in advance for any help - CSNewman
Answer by meat5000 · Oct 19, 2013 at 12:13 PM
Project window -> Create -> Avatar Mask
Define mask (to define which bodyparts are used or not)
Add mask to a new layer in Animator - top layers will override layers below it.
Decide if Additive or override is what you need.
Use layer weight to switch anim on or off while other is playing
Ah, thanks. It works well now, would you $$anonymous$$d explaining how the weight works exactly? im just setting it to 1 as im not sure how it works :D
Answer by ElectricMonk · Apr 22, 2016 at 04:22 PM
You can use animation layers. Check out the unity training video on it here: https://unity3d.com/learn/tutorials/modules/beginner/animation/animator-controller-layers
But how do you switch between those layers per code?
Your answer
Follow this Question
Related Questions
How to blend two layers additive then override others 0 Answers
Character animation position 1 Answer
Root Motion On Slow Animations 0 Answers
Mecanim state that keeps last pose? 0 Answers
Animation Impulse System? 1 Answer