- Home /
Play multiple animations according to state
Hi, I've hit a bit of a wall playing animations in Unity. I just looked at the Animation View Editor tutorial at the Unity3d website and now I can play character body animations and UV texture facial animations.
The problem I have at the moment is how can I play a certain facial animation while the character jumps for instance? Then, when the character lands, play the idle facial animation back. I was advised to use sync layers but can't seem to get it work. Hope someone can help.
Thanks very much. -Hakimo
Can't seem to edit my own post but I think I have an idea how to make things simpler. In the animation view editor, is it possible to call animations on a different gameobject?
do you have the animations from eg. a 3rd party 3D program? such as 3D Studio $$anonymous$$AX, Blender, $$anonymous$$aya, Lightwave or?
Answer by Ricardo Arango · Jun 15, 2011 at 11:08 AM
Have you tried using AddMixingTransform? This will allow you to apply an animation to only a specific part of your character.
http://unity3d.com/support/documentation/ScriptReference/AnimationState.AddMixingTransform.html
If you need to trigger animations on separate GameObjects you could use an AnimationEvent calling a function that initializes the second animation:
http://unity3d.com/support/documentation/Components/animeditor-AnimationEvents.html