Showing posts with label Animation. Show all posts
Showing posts with label Animation. Show all posts

Saturday, December 17, 2016

Control an Animation Transition

This post covers transitioning an animation with a software event.  This post builds upon Importing an Animation into Unity.  The example below is based on having imported a model from Blender that already has two animations embedded in it (swim and idle).

This post will show how to setup a transition condition, and how to trigger it in code.

Looking first at the Animator Controller view, you'll see I've already added transitions between the Swim and Idle state.


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.