Blender to Unity rotating animation around the wrong axis

I have created a basic handgun model and animation in unity in the hopes of adding it to one of my new projects although when I import and play the shooting animation for it, it rotates not only around the x-axis as I want it to, but also around the y-axis by 90 degrees which is not intended as shown below.
(Note that the handgun is a child of the camera)

Before shooting
alt text

After shooting
alt text

I assume this is because of the axis changes from blender to unity but I haven’t seen any way to fix this even though I have been exporting an fbx with the correct axis in each direction. Is there any way to correct this animation so that it does not rotate around the y axis and only rotates on the x-axis as seen below?


  1. Rotate your object by -90° on the x axis
  2. Apply the rotation (ctrl + a)
  3. Save the .blend file into your Assets folder

If you drag the object into the scene, it should be rotated correctly.