How to rotate model so it matches X, Y and Z axises Hey blender stackexchange,
I am working on a remake of a game called Assaultcube, and want to use an original gun model as a reference. I found is in usr/lib/games/assaultcube/packages/models/weapons/assault/world/tris.md2. I used a md2 to .3ds converter (there was no direct md2 to blend converter I could find) and imported it to blender. I used Shift + Ctrl + Alt + C and set the origin to geometry and set the object's location to 0,0,0. However, the gun is at a weird angle. I want the gun to be perfectly snapped to all 3 axises, but I'm not sure how. Could someone please assist me? Thanks.
Here's the blend file, I hope google drive works:
https://drive.google.com/file/d/0B6smClKpjHImOWdvVFRJT3JVSTg/view?usp=sharing
While it is not a solution all on its own, How do I construct a transformation matrix from 3 vertices? shows how to create a matrix from 3 points.  You would have to get the coordinates of 3 points (and the first 2 you would pick to match one of the axes;  The third you would want to chose such that when combined with the other two defines one of the planes.)

Then you would need to take the inverse of that matrix and apply it to the matrix_world of your model.  Then it should align the model with the world axes.