Multiple animations on a simple object

One thing I haven’t figured out is how to have multiple animations onto an object so that I can access them for programming. For example, if I have a character with a walk cycle and a run cycle how do I make it so that Unity sees each cycle discreetly?

thanks,

Kevin

As you import your character it should come with one animation component on the root that carries both animations. If it doesn’t have both animations you might need to split them up in the import settings of that mesh.

Then you need to use a script to change how the animations are blended.

http://unity3d.com/Documentation/Manual/Character-Animation.html

Yoggy,

Can you tell me which programs are capable of creating multiple “named” animations? Is it only MotionBuilder or can it be done in Maya or Cinema 4D (or even Max).

thanks

Kevin

You can also create separate animations of the same mesh and rig in sepaprate files in Maya or other external animation tools and then link them to the master mesh by naming them like this:

character_name.mb is your basic character mesh, rig, and idle animation file.

character_name@animation_name.mb is an animation you want to connect to the first model.

In the inspector, all animations linked that way will show up by name on the animation list for your coding convenience.

One of the best, most inexpensive and easiest tools I’ve used recently is Cheetah3D, for $130. The animations blend perfectly and work seamlessly in Unity. It’s easy to export and import the files into Unity, too, with all the textures and animations intact.

Thanks for the info - that’s really easy (like so much of Unity).

Does the fact that every animation file carries a copy of all the geometry cause scenes to bloat? Is there a way to just have the animations imported?

Kevin

Your runtime doesn’t have multiple copies of the mesh (Unity only sees one model with a bunch of animations associated with it), but your project folder of course will.

But if you can, I would still place all of the animations on one file. Having separate file caused me and raimund a lot of trouble in avert fate.

Yoggy

Having it all in one file makes sense to me, but if I wanted to do that in Cinema 4D how would I separate the animations so that Unity sees them as individually named items?

in the import settings you can specify which frame counts each animation starts and ends. so for example frame 0 = neutral pose. 1=30 = walk, 31-60 = run, etc etc. unity will do the rest at import.

http://unity3d.com/Documentation/Manual/Character-Animation.html

cheers.

Thanks, you’ve all been a very big help.

Now I’m wondering about another thing…

I brought in a cube with some tranalation animations, and no matter where I move it, the playback of the animation always wants to jump back to the world coordinates where it was animated. How can make an imported translation animation local so that I can make it start wherever I want?

Kevin

Parent it to an Empty Game Object

Welcome!
AC