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
After shooting
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?