Unity 4: Preorder Mecanim Beta Tutorial

Uploaded by Unity3D on 28.08.2012


in this tutorial you'll learn how to use the mecanim animation system
how to create loop-able clips
how to work with avatars, apply animations
how to work with the animator controller - the state machine of mecanim
using states blend trees and continuous blending
and how to use curves to get data back from the animation
as well as adressing IK a handles in code
this project is made up by separating at the art for the character and the
animation for the character
so in this folder you'll find a set of animations
that are made-up of very basic art
because we're only going to use the animation data stored within them
the rig for these animations is based on this "dude" avatar
so this particular character we have here
we're not going to make use of him
we are simply going to use the rig that we've already got from him
so to create a rig for him we've used the "create avatar" checkbox
and it's already been configured
so if i have a look at the configuration for him
i can see the his skeleton is green and all of the different parts of his body
are already set up in the system
what we're going to do is to create that from scratch so to start the tutorial

go into the Tutorial folder and go to 'Tutorial-start'
what we will do to start this is to have a look through those animations
so all of these animations
are setup using a muscle definition
so a definition of how the rig is setup
from that avatar I just showed you - the guy that we call 'The Dude'
and all of these things have already had clips created within them
but if you have to bring in your own animation
what you can do is to set up new clips
and define a range of frames in order to create different animation states that
you will apply to a character
whilst I can go into any of these states and preview it and see how it
will look
what i can also do is to create new states
so a particular example of that of one that we will do later is run so you'll
notice that run doesn't exist in yours but we will create that in a moment and i'll
show you how that works. So the first thing to do is to address the actual
character we're going to work with
which is this Robot so have a look in your tutorial folder
and you'll find a file called "Kyle_Robot"
the first thing to do is to make him into a valid avatar that we can
use to retarget the animation we've stored in the other "FBX" files that
we have here
so all of those different motions we want to retarget onto our Robot character

the first thing to do is to go and check the 'Create Avatar' box and hit Apply
we'll then hit configure what we can do is either drag and drop these all on
Or I can just choose 'Mapping' and hit 'automap'
so that's done most of the work for us, the last thing i want to do is to set up
the "T-Pose"
So I'm going to choose 'Enforce T-Pose under 'Pose' at the bottom
that completes setting up our character he's now ready to have animation applied
to him
so i can hit apply at the bottom
or done to simply save and return
to my
previous Scene
so now that the character is ready to be set up
what i'm going to do is just drag him into the scene, drill down into him and
select Robot2
and apply
"Use Light Probes"
that's given him some nice lighting and the main thing that we want to look at is
the Animator component. So this is a new Component that comes with Mecanim
and what it means is we can apply a state machine
ie. a controller asset
uh... to apply to this character
so we need to make that asset, so i'm going to select my tutorial folder

and hit create on the project panel and choose animator controller
so i'm gonna call this robot controller
as a new asset
I'm then going to re-select my character
and drag and drop that asset on
as the particular controller is to use
then as you are doing this for the first time
go to Window
Animator Controller
you will then see
the state machine window known as the Animator Controller
you'll also see which particular
controller you are working with by looking at the bottom of that panel and it shows
you what folder and what name of the file
we're currently working with - so 'Tutorial folder - Robot Controller'

so the first thing you'll see when you make any new controller asset
is this 'Any State'
we don't want to particularly work with that
because we're gonna define our own states for this
and the first one I am going to actually define for this is an idle state
now the first thing to do is open up the Idle's FBX file
and look at the idle animation that we've already prepared for you in there
if you drag and drop this animation
it appears as a state
and the color orange here denotes that this is the default state for this machine

now if i look back at my Robot in the scene
and press 'Play' you can see that the animation for idle is automatically
applied to this character
so straightaway we've got some animation being applied to this guy
what we want to do from here is to create some actual states that we can control
how we're going to do that is to create a 'Blend Tree'
so you can put in other states that are just individual animations but if you wanted
to blend different ways of moving together then the best way to do that is
to use blend trees
so to do a basic blend tree we're gonna start off by learning about walking backwards
uh... because the the forward motion is more
of a complicated technique and I wanted to show you a basic blend tree first
so we're going to say.. 'Create State'
'From New Blend Tree'
and I'm gonna rename this Blend Tree
"walk back"
so notice my naming conventions are capitalised, this is because i'm going
to address these in code later
so to actually edit this blend tree I am going to double click on it
to go into it
and then the first thing its expecting me to put in is a Parameter
so Parameters are also noted in the bottom left of the controller window
and what this means is that i can
used these values to receive input
and apply them to animation or apply them to make decisions about what
animation should be played
so I am going to make two new Float Parameters, one called 'speed'
the other called 'direction'
so outs of these two i want to use direction to define
the blending between the different animations that i'm going to put into this tree

what I am going to do is add three new motion fields
so a motion field can either be.. using a clip or using another blend tree
so i'm gonna just add three motion fields so click on that plus button
and go to 'Add Motion Field' three times
then the next thing I am going to do is to click on the lower threshold so
this visualization here shows you the threshold
from uh... the first motion
to the last
on the first one i want to be minus one
the reason i'm doing this threshold from minus one to one
is because what we need to do is receive input from horizontal or vertical
axes, and in unity what we do is to set minus one as hard left
plus one as hard-right
so what we're going to do is to add-in animations and when we're holding down
the left key we're going to be playing the first motion
when we are not holding any keys it'll play the central one
and when we are holding the right key it will play the third one handbook
so we're gonna look in the 'Walk Back' FBX clip that you will find in the
animations folder
I'm gonna drag on Walk Back as the central one
so that's a clip of the character just walking back
in a straight line
that we've got walk-back turns
so if you drill down into the 'walk back and turn' file
and go to the animations beneath that
notice if you select anything obviously the inspector will change so simply
click back on your blend tree to return to it
and i want turn left to be the first motion
and turn right to be the third motion
then what I'm going to do
is return back to my Base Layer
so animation in the controller is done in 'Layers' and we also can address these
layers like any other part of Mecanim via the API
and i do this within my code so to simplify things what I'm gonna do very quickly

is just to rename the Base Layer to 'Base'
and i need you to do that too because we reference it inside code
so, the base layer is renamed and i have my blend tree for walking back
but how do i get from idle to that blend tree
well what I'm gonna do is select my idle state right-click on it and
select 'make transition'
now when i move the mouse i'll see that there's an arrow attached to the end of
my cursor. I click on the state that I want to go to and it then makes that transition

likewise I need a transition to get back so I click and click again to return
so to get to this particular state
i'm using this transition and when you click on a transition you get
information on it
and the ability to edit it inside the inspector
so what i'm going to do now
is to set a condition
so i want to say that when something happens we're going to go into that
transition and not play idle any further we are going to blend into that one so you'll
notice that exit time is the default for any transition and what this means is
once that particular animation ends - in the last of the ten percent of
it we're going to go into another state
but we don't want that what we want is for a less than transition - we're gonna say that

now when the value of the Parameter 'speed' that we created
is less than minus nought point one
so bear in mind that we are making a walk backwards animation
and then for the value of the transition going back to idle
we're going to say that
a greater-than transition for Speed
to being greater than minus nought point one
if the Speed key is being held down
then we're going to start walking backwards
uh... and then once we
get above minus nought point one into positive figures
we can get back to idle
and then eventually once we've made
uh... blend trees for moving forwards obviously will go from idle into those
so for now what we're gonna do
is add the script that provides the input for speed and direction
if you look in the scripts folder you'll find a script called bot control
simply grab it from the project panel
and drop it on
this script also requires a rigid body and a capsule collider
and you'll find that these have been added for you
so let's take a look at how the script works and how it provides the parameters
speed and direction a valued. To begin with the script has values for
the animator
capsule collider and rigid body - it requires that those components be attached
because those are the ones that we're going to be working with
so we grab hold of the animator component by making
an animator variable
and then we set it up in Start. Then what we do with that animator variable is to
actually apply the values of speed and direction
by using horizontal
and vertical input axes - in update I grab the value of them and then in fixed update
because we're working with physics
we are going to start setting those values
so we can use the Set Float function
to apply a value to a particularly named
float inside the system
so with v
the vertical axis I set speed and with the horizontal axis along with some
damping based on a variable
I set direction
i'm going to save my scene
and i'm going to
look at the scene view
and then you'll see that the
capsule collider has been applied as well as the rigid body
but they're not quite in the right place so
what I'm gonna do is go to my capsule collider and I'm gonna set the Y value
to one
and i'm gonna set the height value to two
so this is the correct size for our character
then on the rigid body i'm going to freeze all of the rotational values
because I don't want the actual body itself to rotate then i'm going to
set the mass to a value of three
and crucially to allow the animator, so the system to work with physics i'm
going to check the 'animate physics' box
that will make sure that all the different physics considerations get
carried along when the animations are causing the character to move
so if I press play now
my character is in the game
and if i move backwards i could step backwards
and likewise
i can walk around
left to right
so now that i've got those in there what I need to do is start moving our character forward
because it can't very well walk around backwards everywhere into it
so i'm gonna start using my controller window more and create another
blend tree for moving forward to drag around inside the controller window hold
down the alt key and drag in empty space
this is going to help you out when you are moving things around and creating
larger state machines. What I'm going to do now is to get back to my animations folder
i've got a number of other things that i want to work with
now i know that part of this will be to create a running animation
so as I promised earlier I'm going to show you how to create that clip
so i'm selecting the FBX file that has the animation data in it
and i'm gonna go to 'animations'
now my run left and right are things we've already set up
but if i press the plus button
i get brand new animation
and i'm going to name this 'Run'
and then i'm going to actually choose some settings for it
to begin with its just a complete motion capture take that we got from the studio
but now what we want to do is to set up a frame range in which he's running
consistently and in a loop-able manner, what I can do is use these in-and-out points
and setup reasonable run
so the first one that I'm gonna set up is this round about there and I do this because the
thighs are pretty well matched together
then what I'm going to do is track until i've got a fairly similar pose
at the other end so..
I will start by being fairly close
and then drag this out watching the preview
to see where it syncs up
now i can see that it syncs up pretty well right there and also unity helps me out
by showing me when the pose rotation and height are both the same at both ends
of my chosen frame range
so what I'm gonna do then is to press play again
check the animation
and what I can do is check these boxes
to ensure
that nothing deviates whilst that animation plays
so i've now got very fluid
running animation created
and to just save that i hit apply at the bottom
so that's how to grout you-all animation clip from the larger frame range
and you can do that week
anything you've got it doesn't have to be affirmation capture studio it could
be something you created as many different animations in in one
particular time line
and you can just keep adding animations for the past button
and naming them like that
so let's put this into a animator controllers for the first thing we do
here is to create a new state from upon entry
and because the technique they were using here i'm gonna call this
delegate double click on it to go into it
and the particular thing though what this based on his speed
so this plane tree is not going to have mission fields on the it's gonna have to
plant trees attached to it
so i'm not click on the plus field parent of a say new plant trait
and this particular blend trade is going to be full all xx
so it's going to be having walk forward look forward to the left and walk
forward to the bright and this will be based on directions
so the original one speech will choose whether to go into walks overruns which
were about spin
and direction will choose the blending of
may be left to right in either one
so now that i've made that new country for walks under the clinton the
different fields for it so it can light walking backwards we're gonna add three
motion fails
that the trust fund
and to set the threshold the lower threshold tamanna swamp
and then i'm gonna go into my walk forward
drop-in as the central animation
and i'm going to walk four times
and drop in my turn right as the first and turn left as the first
sake you now say that ongoing from blending walk into turn left and right
and forward
now i'm going to return to the pace of my plant trait and i'm then going to add
in one more child plane tree on top of that
and this is going to be for running
so i'm gonna select anyone
and i'm gonna name it
runs at the top
and again i need the basis of this to be direction
this is going to choose whether i'm running for the twenty-four to the left
or running for to the right
center at monitoring mission fields one more time
i'm going to looking my animations photo
and find my runs
and first of a minute
in the run the bridges created
then the run left
and then the run rights as the third
again a neat marita low threshold to be
minus one
because the input value i get back from the keys and from a joint that
will go from minus one
to positive one
so i can now see i've got that complete self walking and running sets out
so if i could come back and cheese to preview i'm running for it and you can
see the pantry shows include one currently playing
if i set my speech
and previewed
i concede i'm going just a behof way so
is currently playing a blend of fulwood
and forward running
and if i can increased my speed
it diverts try to running forward
so this technique is continuously blending and what it's doing
is looking at my speech that he said it's the right it's doing their blending
it so in other words will go back to our door
and then at full it's going all the way in to run
sensitive making individual countries we'd have to jumped from one state to
this is continuously blending or the fact animation
certain to stop reviewing now and return to my place where
and i will create transition so i'm gonna right click on audio
and then click on the commission to create a transition to it
and then do the same the other way around
then also let my transition for private locomotion
and say that my condition will be a great about the speed
so for that and simply give us a the its speed is greater than the one one
within a maid insular commission
dennis p drops to less than look for a month but with a return to idle
so that is there a point why does god play and
on the same token locomotion we'll play wermer above zero point one
so let's return so it seems you and test out
i was going to meet my character
thought a little bit so that we press play we can said he's doing
and now you can say to the carrots is running around
and blending between all of those animations and if i let go of the case
he's gonna plan back to being expired or
also what you can do with this is to life link
and make sure that my character selected
you can see what's going on
inside the state fishing
i can also enter that state machine
and get the same effect
now you should notice that the character is moving around realistically and he
has their rigid body and the capture collider attached to him so if i run
into things and then it's not the modem
what we also wanted to is to allow him to jump around as well how we also want
to scale this collider based on the animation of john thanks for the first
thing to do is to have a look at the jump animation in the animations photo
and wanted to do with that is just dragged jumped
the animation beneath it in as an individual state
then and skin amitha to some us it's more like this and i'm going to create
any transition to its uh... i'm going to right click on the commission and she's
make transition
and do the same
the other way around
i hand you want to be able to jump when i mean this locomotion states are fun
currently a walking or running
then i can jump
uh... but from what i don't it's gonna look a bit strange because this
particular jump
looks like this
so it's a kind of run for it and then barrel jump to the side
so motivated to get into this is to set a key pressed to trick a eight billion
something to make that promise and now i'm going to say
the private sector come aplus
and i'm gonna call it jump
just to referred back to our scripts
that particular improved his set by the jump key that we have
so typically in unity that suspect spot and this time was saying set who'll
instead of seven flight
i was saying that to trick
so if you'll current state
isn't based or locomotion so that's those animes refused amma pursing input
demo set up an easy trip
so deep in reference states
by making any
variable for the so for example
i've made i'd like to stay info variables base current state
based mixtape
and other news which it will be another layer of animation that will look at
song querying that is
and checking what they currently are
to decide what i'll do with mikey input
so for example later we'll look at is adding a planned animation of the robot
and when you do that if we in the idle state
so that's a good way that you can check and control based on what kind of state
that you're in
so to get to that wanted to do is simply click on the transition undecided
jump if that's trouble to treat then will transition into it
and i don't need to adjust this because it simply says exit time so towards the
end of the animation the last commit ten percent it's gonna transition back to
running and locomotion once that's done what we can do is press play
stock running around and when i first baseball due to a child
now one problem that we need to sell for this
is that when we jump he's not actually jumping over things
he's jumping into things and i'll show you why now the character has a
catch-all collider as we've seen so what we wanted to see what happens so that
when we jump
so when we going forward
what you can see if we stepped through this having holistic
has been the actual collide it doesn't change
and that's obviously a problem for realism in terms of where the characters
is positioned
so we can do if that is used animation and because feature to drive the size
and positioned of the collider so select the jump on a mission the animations
go to the animation style but cannot there already
and then scroll down
underneath cuts what you see is which sets up three different cuts collider
hyped collider why as a vehicle jump on it
now what these curves main is that we can set up values coming in this afloat
during animations and you'll see is a scrub three the previews
the receiving different values
so the studies a changing and i can set into whatever i want
maki frames
and i can select them to go into editing in dino walker that same way that you'd
expect inside you tick
using busy a carrots and key phrases
wife down with a studies is to feedback information based on certain points
and what want to is to scale down the height of the collider
where the jump so we start a high altitude
amway jumps up
will scale down
and then scaled back up city
the white position
needs to be attenuated from one upstate
and then back down to one again
and this jumper value is simply going for one
into a positive value handed down into a monastery these collider cuz they use to
adjust these shape and position of the collider welch jumper is used to apply a
slight forced to the rigid body botsford jumping
so when you make cuts for these things
we need to actually create promises to receive them
sunday to create a flight for collider wont
afloat for collider heights
and another for jumpa
so now house correct can receive all of those cuts so let's take a look at where
it does this so inside ball control
you should see if you scroll down
that were using the kind of get float
you can see here
online at seven
to change the center of the collider
so i've created paid very vocal call which references the capsule collider
an obsessive sensor
to be equal to
this value
so this time it 'cause when we are in the an jumping states says any gannett
mri scan a when we're jumping
and it's not committed if we ate ko in transition
and to avoid any kind of kitchen asin changing heart
uh... during transitions
so uh... then we also just think the heights using that flat value that we've
got from the animation
and finally the jumper value is something that we using to act force
you'll notice also that i've track days in a uscourts brilliant so far it's time
to my script i said to have a public checkbox to enable those
uh... this is just for the sake if these insuring you think cinemania manner in
which he sort so on their first play now
uh... i'm going to look at my same views that i can see the collider of the robot
and just to show you how this works
now if i run for it
jumped goes by stepped through you can see that the qlogic it's free skype
and does the same when it comes back down
so if i play this in real time you can see that i can jump over things
and also i can't jump and take out the highest acts of boxes
so that's one way to trigger an animation so using a simple ball
and things scaling the collider appropriately
but what we might also wanted to is to trigger animation
uh... based on the environment
so what we've done is he prepared some triggers that will go into the game
wanted to get you to do is to guarantee the prefab spada
and like eight something cool jumped rekha
now jump trigger is simply a box collider which is set to be a trigger
and has that particular named
so one and it it is to position this
quite close to the edge something like that
on top of are yellow container
and what this is going to do is to trigger a new animation state
so the animation say it's going to make the charity jumped down and roll on the
and knock over these
so this particular jump trigger
needs to be able to cold animation on the character
so we have a script for this so if you re select your verbal character turn to
the scripts folder
and then track on the an end triggers script to that character
if you open up that script
you'll see the bullets doing
is checking for
particular triggers that we ensor
and then setting off eight billion
to true or false based on the case
so this particular bowl his coat jumped down
so what we need to do this to receive that particular piece of information
service tends to control the window
and making you cry itself which is a type
anand everyday this jumped downcast o_j_ antique
then what would lead to is to for in the animation itself as a state to go to
so in animations
what you'll find is jumped down rolled rome
and if you open up at the bottom you'll find the animation itself
and it will look something like this jumping down rolling forward and running
so drank that animation in as a new state
and we're going to create a
transition from locomotion sir right click on the commission
and make transitioned
then right-click on the only state
and make a transition back
click the transition to the new states
parent will say if
jump down
and they would just leave d normal exit sign in order to get back to the
what was seen now is that a free press play
and brown a character around will run up the crowd
essentially hit that trigger
continue animation distribute jumping down rolling and then transitioning back
into running the reason is taking up the bottom row is it was scaling the actual
collider yes again us we running to those boxes at parents like the
got catch-all collider and its height
popping reschedule to get
got and you can see that when he's a bull
he's going to knock into the right things how do we do that well way using
exactly the same technique has been used before so if you have a look at dropped
out and rover on
and click on the clip itself
you'll see that there are a number of cuts out the same way and we using the
same products in ames because we can sydney reuse them we don't need separate
ones because it's a different animation
and the studies is to be going
from normal
and then as
i think i is coming down to land will be scaled and then as he gets back up again
we take it back to its normal values
that's how we came uscourts to control things in the game of course you can use
cats rolled orcon stiffened purposes but that's a great way to get
takes a back from animation
then the next thing we're gonna do is to abstain a crap so with a look at how you
can address by carry handles
and we're going to
introduced idle crap so if you look in your animation product and drill down
into auto craft
track and drop that and
someone x titles so that kinda makes sense
then i'm gonna make a transition from rival to grab
and under the select that transition
so i i didn't go into allow this
only if reading the article state cemetery go from quite a lot to crap an
so wanted to do
is to create a new pool a nickel a graph
and i'm gonna say that that transition says if
so again this is something that we've covered in the scripts
so this latest traded using any treatment so if i look at my an
intricate scripts
then what you'll see is that if we anticipate cold crab trigger in the pool
that we just made grad
is set to true
if you have a look at your saint
we'll see is that that is a graph trigger
already set up
so this particular trigger area
which is defined as a quick area
uh... today if the reebok pumps intuit or is is coming there pennies to make
grabs for this french
so what we do then is into power
ball control scripts
we have a function code on avatar like a
and because the trigger itself is causing us to go into that state we
checked that we are keyed in that state or moving to it
and then we set up a few things
so firstly we have to pay curve and a right-hand reference
so the care of itself is a cuts coming from the animation of grabbing
and it's moving from zero to one during the animation
it looks like this
say customs area
to one down again
the reason that we're doing this is
this particular crap
looks like this
we can't control where his hand disconnect end up based on animation
so this is where we used by k
so the aren't right for this particular one
uh... it sets up based on my script
so why do is use whites to select whether the position of the hand is
using the animation always using pike et
so that cuts is used to define whether it's currently using like a all kind of
using the original crap animation itself
so what we say is that if the grapple object exists and we have an already
picked it up we're going to set the weight of the ticketing for position and
to beat based upon decrypter
so make a reference to uh... avatar and also the right hand is a lot of codec
and references the actual right hand
and set up in the muscle definition or in the
skeletal raking
uh... that was sort of a star
and then was simply going to see carol a particular position
sober seeking out the objects position
which is the wrench really sets up
uh... and then if if no this is happening then we set it back to zero
but that kind of is already taking it to wants a second hand to the right place
identically back again
site let's take a look at how that works so if i a return to my character and
first off i'm going to unchecked the uscourts
so by half that as part of my hike a script as well
fight that allow it to reposition base on the kind of if that's occurring
so are going to what mike and i said background to wear this particular
trigger is fine art got my hand and trade is in place already
have basically want to cause him to do a craft now that particular crappy
obviously didn't expand to the right place
serve member that we've
use that kind of
i was referred stick
encode but we also need to do to connect those two things together
it's to make a float inside the animator window
senate returns my control window
uh... i'm going to make a
another prem it's a which is a flight
and equality graph cuts
so now we have a connection between the animation dates of the cuts coming from
and the actual script it's causing it to be used
if i go back to my right well andrea naval cuts we can now received cuts and
look at it
actually use up like a take over from animation
reposition had
so now when a new friends
and gets the rock point obscure approaches slowly
then to hand carries to the right place
cdl more time
sailors reach into his body he's going to the right place
mobility with that now is to actually protect whether the hand is overlapping
so i'm going to drill down into my rebel
i'm gonna find his right hand senator into right shoulder
and going to write form to find the risk
then when they do with that is just too simply at stake actual colitis so
with the right which translated
i'm gonna say physics
capture collider
it's going to be a trigger
it's gonna be placed on the x-axis
and that is that the radius to value off twenty one
and then i'm going to set the hike study to about a plot no point two
so we just have a very simple tregea to detect if it's guns pickup dot t_
the last thing to do is to tactic with the word hands
assets was done in my script
so it's a very basic concrete example for how you wish that you so i can come
pick things up and that it shows you or the kind of commands that you need
similar free will cover about rounds
to where the righteous let's just greece into the scene viewed
then we can just go and practice objects that but this is the admitting to that
trigger area he picks up the ranch and now he's got it
so that what we're doing with that if you think is moving in into that trigger
we all and grabbing the objects because it's something that you can pick up we
have a
pickup scripts attached to the object
um serif it's god inspected by a trigger court hands
uh... that we just simply at it as a apparent objectives the thing that it's
been hit by and weary saying its position rotation two
sick with that i can handle ad that we're telling the script that we've now
got that range so it doesn't need to try to form that action anymore
safe we now have a i've got ranch flag that's esp intricate the financing that
we need to look at is body masking if you wanted to take a one part of the
particular robot and animates him while still using one of the sound of a nation
wikinews different layers
so always duties to avenue left
anna nicole disneyland other moves
i need to actually select part of the body to perform those moves so we do
this using a body mosque so you can see it says moscow which is currently set to
so if you select that sheet oriel folder in the project panel kinder to create
and cheese avatar body mosque
now wanted his name this off the what would masking so
we're gonna save rights calm
using the you are on the right i'm going to the everything but the right on
center click on all of these two tend to read
uh... only going to add to make the right arm
so what to do with that is to get back to my letter
and select that has a particular
buddy moss to use so click on this
and she's right on the link
and you'll see that the blending is set to over right so what's going to do it's
just overwrite the state that it's a boxer's above the base layer
so what that means is just not overwrite that letter
soak the cool thing about this is that we can put in states in here and earned
the right bomb will be animated lost all of the other motion will be from the
base there
so amenities to create eight default empty state
by default we don't want this to overwrite anything we just have this
empty state
then wanted to is to bring in an animation of waiting so if you look in
your emotions photo you'll find idols wife
an animation looks like this
just a ghari waiting his head
so within a doctor and as a state so drill down into a confined animation
itself drop it in
and we are going to transition between those two points
so that the committee state and make transitions
and then on the way to get back again
he'll give us a if we are waiting so yet again we have another poll
so if that gets triggered through safe wave
they were going to this one
and with that transition still selected i'm gonna say x
and says it's a waste
and as with the full i can use exit onto just transition back automatically
certificate that's what they slap
events lexmark robots and look in the ball control scripts confined where that
way is taking place
so if i'm currently in idle anti prestige up but so if i'm currently not
doing anything it's sold by far pressed jumped then i can set that whole cool
place to trade and it's going to make that transition for us
now the cool thing about this is that while starr has to be in idol to trigger
a it still gonna take place if i then stopped moving forward into locomotion
because it's overriding
when blending of the top of the running animation
so if request plain old and to take a look my character
i can ask in two ways
if i'm running around
and a start waving idle and it's not running
he still waiting because it's blending between those two points
certified wave again start running still running like a martian but it's also a
running the other news
so that's a very simple way to use
body masking to create that and also of course
huge uses for more complicated things like turning looking at and firing a gun
most running and all of those kind of things
sonar that gives you an insight as to various different parts of mechan in as
they are today and the kind of the facts that you can get out of them for a
thanks for watching