Saturday, December 17, 2016

Import Blender Animation

This post details how to get an animated model into Unity.  This post is built on post on a different blog which can be found here (if using blender): Multiple Animations in Blender.  Once you've created your model with built in animations, bring it into the Unity project.  In this example my model is called "TestRig".

The first step is to add an  Assets > Create > Animator Controller.  When you double click on it, you'll see a node-editing type view.




Clicking the little arrow on the model will expand it into its elements.  You should be able to find your animations as elements.  In this case, I'll drag the "swim" animation into the view and transition is automatically created from Entry.


At this point the animation will play.  To have it transition, right click the block, select Make Transition and a transition arrow will be created for you to drag to another animation block.  In my case I wanted to loop the animation so I had the arrow point back at Swim.


In the Animator component on the model itself, assign the Animator Controller to the Controller field.


At this point when you play the game, you'll see the animation play out on your model.


No comments:

Post a Comment