Home > other >  Transfer: Unity advanced animation system -- to character animation
Transfer: Unity advanced animation system -- to character animation

Time:09-19

Unity advanced - http://blog.csdn.net/ios_song/article/details/52367210 - give character animation animation system

On an article, we have the Unity advanced animation system - Mecanim animation system had certain understanding, this lesson we give the role to make some simple animation, first take a look at some basic flow animation,

A, give a general character animation steps

Import model and animation and set

Add character Animator component

Create and set up the Animator Controller

Scripting

Animation step is, first of all we want to import model, import the animation, animation and model and some Settings, set up, we need to add character Animator components in the scene, at the same time we want to create Animator Controller, the Controller animation and animation Controller drag and drop to the Animator component, then the Animator view, set up our animation Controller, set up after, we can add scripts, in the add script, to control the animation,

Two, in the Unity we do specific presentation:

First, we find the Characters in the resource bundle folder, there is a character, drag Characters back to the scene, (, access to resources of packages to join the video released last QQ group, in the QQ group Shared file downloading)

The effect of drag and drop after the diagram below:



In the Rig Insperctor attributes, we create Type of Animation is the Animation Type displays is a Humanoid - human Animation, so in the process of creating, our resources have been the default has an Animator, if Animation Type is none, there will be no Animation,

At the same time, the Avatar Definition and configuration completely, so we don't need to configure,

Currently we operate animation, animation will not have any action, in order to control the movement of the animation, so we need to create an animation controller,

1, Project view, Create, Animator Controller


2, named PlayerAnimator



3, and then pull the PlayerAnimator controller to - selected characters in the scene then dragging back!



4, now let's run, still no action figures, at the same time, the shape of the characters become strange, although we create the animation controller, but we don't give the animation state machine set any custom, we will set our next create animation creator,

Select the Animation state machine, and then double-click into Animation view



5, we need to give people a default state, the task to create a Idle animation, the effect of character stands out,

Looking for an Idle animation in Assets - Arimations -





6, the Idle Animation directly drag and drop the Animation view - an orange Idle Animation state, then we run the model, there will be a the effect of the in situ rock!



7, if we want to have other Animation effects, steps are the same, first of all, we want to do what action figures in the scene, we took this action Animation clips, drag and drop to the Animation view, such as attack, we just need to find the attack Animation clips, then drag and drop to the Animation view, also generates a state, is generated by the state and generates the status of the color is not the same as before,

Orange is the default state, when we first entered the state of a state machine implementation, and gray is the general state!



What would happen next we run after the results? In next article to share!

CodePudding user response:

I don't pull the animation into animation animation?
  • Related