Maya / Unity Animation

Claudia has created a model in Maya and has animated it…

<Image>

Now to put it into Unity

 

First you need Maya

You do not need to use maya – it will just run in the background while you import the assets.

Import the Asset

Import Asset – you want the .mb file

screen-shot-2017-02-27-at-11-11-52

This could take a while to import but when you are done,  you will have your model.

screen-shot-2017-02-27-at-11-12-06

You can check that the animations have been imported correctly as well.

screen-shot-2017-02-27-at-11-12-19

Attaching the model to the rest of the player

I just dragged the model onto the Model1 component of player 1

screen-shot-2017-02-27-at-11-12-06

You are now given an animator controller. You can link the Avatar to the model you are using.

screen-shot-2017-02-27-at-11-13-40

Working on the Animation

You need to create an Animator Controller, I have called mine walking.

screen-shot-2017-02-27-at-11-13-13

 

In the animation window, you can create a walk box

screen-shot-2017-02-27-at-11-12-59

In the inspector you can link it to the animation that were imported with the model.

Screen Shot 2017-02-27 at 11.22.51.png

 

Back to the Player Character

You can now attach the controller in the animator part of the player component/

 

Finally a little bit of script

I want to only make the player animate when they are actually moving.

I do this through the update function where I check if the player is moving and then enable/disable the animation.

screen-shot-2017-02-27-at-11-12-46

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s