This article will show how the basics of animating in Autodesk Maya work and how to export your animated object ready for use in Unity. For this demonstration we will create a box that has a lid that opens. In game this animation will be triggered by a key press. 

Step 1:
Make sure you model your box with two distinct parts, the lid and the base. I know this sounds obvious but we only want to animate the lid.

Step 2:
We now need to move the pivot point of the lid to act like the lids hinge. To do this select the lid and the move widget (w) and hold (d) on your keyboard. This allows you move the pivot point to where the hinge would be (see example image below)

Step 3:
In the timeline panel at the botom of Maya set the required frames to 30. We are going to create two animations within this one file, an idle animation (frames 1-6) and an open lid animation (frames 7-30). We can then split the animations up when we import the asset in to Unity.

Step 4:
Select the lid object and making sure it is roteted to shut, select frame 1 in the timeline and press (s) on the keyboard. This will add a key frame to the timeline. Now select frame 6 and press (s) again. This has created our idle animation.

Step 5:
Now rotate the lid so that it is in the open position. Select frame 30 and add a keyframe by pressing (s).

Step 6:
Test your animation by using the playback control panel on the bottom right of Maya.

Step 7:
Now we are ready to export the gane asset ready for use in Unity. Select frame 1 in the timeline, then select both the lid and base of the box. goto File > Export Selection and export the asset as a .fbx file.

Casino Bet 365 is best casino in the world.

What's Next

Next up for Unity Snippets is a look at game development articles from across the web...

Free Templates -
Popular Art Betting make bookies articles.