   3D Math rotation problem.
  Alright, so I've got a Model of a spaceship, it's model faces the screen. As in the cockpit is the front of the model. I'm working on a simple boids algorithm that works. My problem is the rotation of the model whey they are flying around is buggered. They fly as if the left wing of the shuttle is the front of the model. And sometimes even go flat, the model becomes 2D? I'm using gamebryo as my graphics / math library. In gamebryo the Z axis is up and the Y axis is into the screen I think. If anyone can solve what I'm doing wrong with this math it'd be appreciated, I've gone brain dead again!This code I'm using here makes the models left wing as if it was the front of the shuttle. So they all fly sideways in other words.NiPoint3 YAxis(0,1,0);NiPoint3 ZAxis = m_Direction.Cross(YAxis);YAxis = ZAxis.Cross(m_Direction);//   (col0  , col1 , col2 );NiMatrix3 Rotation = NiMatrix3(m_Direction, YAxis, ZAxis);m_Mesh->SetRotate(Rotation);Thanks heaps guys.   
  Well, you don't appear to be normalizing those vectors before putting them into the rotation matrix. That will only work if mdirection is already normalized and it's also always perpendicular to (0,1,0) otherwise you should be normalizing to avoid random scaling. The whole flying with the left side instead of the front just means you've mixed up axes somewhere...Not much to suggest there besides some trial and error to determine what the correct orientation is.   ;  Thanks for the reply, m_Direction is already normalized. I'll try normalizing the other one as well. I always gets stumped on stupid problems like this.   