- Home /
how to play split animations from a blender model?
I'm losing my head while trying to use inside Unity3D some multiple animations of a character made in blender. In blender I've created a long animation that from frame 1 to 400 has to be used as idle, and from frame 401 to 440 has to be used as walk animation. Exported the model to fbx using "unity" preset, taking armature, mesh, animations, all actions. In Unity the fbx is seen well. The prefab shows one animation. Then I used the Split Animation inspector tool in Unity and divided the animation as follows: idle start 1 end 400 WrapMode loop; walk start 401 end 440 WrapMode loop. Now the prefab shows those two animations, idle and walk. The Animation inspector tool also shows two elements, respectively element 0 is idle and element 1 is walk. To control my character I use a third person controller script that I successfully tested with the "muktargame" animated monster model from the asset store. It runs very well. That script uses some variables, and for my character model I set the Idle Animation at "idle" (the name of my idle animation), and the Walk Animation at "walk" (the name of my walk animation). Despite all that, when I hit play, my model correctly loops the idle animation, but when I use the arrows (working on a Mac) to make the character walk, it doesn't use the walk animation that I set: the character simply slides along the arrow direction, without playing any animation at all. I repeat: the same script tested on "muktargame" from asset store ran very well. What have I done wrong? Maybe something in the animation labelling or something around there...? It would be very, very, really very appreciated if anyone could give me the exact detailed workflow and instructions on how to solve that. Please, no answers like "try-to-set-this-don't-remember-where-and-when"... ;-) .
Answer by Owen-Reynolds · Feb 11, 2012 at 03:49 PM
Test whether Walk is working at all. In your case, simplest thing is to jump in the script and temporarily replace "idle" with "walk". Or, drag in the prefab copy, disable/remove the script and change top animation slot to Walk.
Also, I feel silly saying it, are there any run-time errors? Muktar may be be playing "headbob," which crashes on your headbobless version, and it never gets to Walk.
Can check whether the gameObject has the correct Walk. It's possible you have Muktar's(?) walk. Or, sometimes animation names get doubled-up and you'll have 2 Walks, one of them non-functional. Since the bones aren't the same, it just won't do anything and won't give any errors. Simplest thing is to rename your walk "WalkA" or something.
Your answer
Follow this Question
Related Questions
Blender to Unity animations not importing correctly 1 Answer
Blender FBX import problem 0 Answers
Waving flag animation in blender to unity 1 Answer
Animation Clips for Unity3D 0 Answers
How do you make pupils move along an oval-shaped eye? 1 Answer