How do I create animation clips in Maya and import to Unity?

Basically what I want to do is have a cannon firing in my game. The player can turn the cannon left and right and adjust its angle. What I want to do is have the cannon rotate around its wheel axis as the player increases the angle, within the bounds of a set minimum and maximum angles. I also want the wheels to rotate as the player turns the cannon left/right - separate from the up/down angle.

I have already created my model for my cannon in Maya and am ready to begin animating it. I have also already created the scripts in Unity for rotating the cannon left and right and changing its angle and for firing the cannonball. How would I go about creating these animations and importing them into Unity?

when you have made your animation go to Edit > Keys > Bake Simulation

Export it to and FBX and tick Animation and Bake Animation

When Unity imports it, it will be fully animated.


I have done this but it still doesn’t animate (in the preview in unity). In general is there something special i need to do in maya to create an animation?
My workflow is the following:

  1. I make a character by gluing different shapes

  2. Then i insert bones and rigid bind then to the sharacter

  3. Then i creating an animation with keyframes by rotating the bones

  4. Then i select the bones and the character> export selection> .FBX with animation

But then when i importing it in the assets of unity, the Take001 file is just standing still in the preview (the bar is playing although).

Is there a fixxed way to make animations in maya and export it to unity?
What am i doing wrong?

Perhaps what you can try is (in Unity) to go to Windows → Animator then select the Take001 as the motion file.