   still need help in rotation
  Hi guys,  I still want to rotate a ship like an airplane diving and rotating on its own axis but I haven''t figured it out yet.I looked at quarternions and rotation matrices.I used glRotate, but for some reason my coderotates along one of its axis fine but still rotates around the statinoary world axis which I don''t wantif someone could give me an example of the right wayto do it I would greatly appreciate it.Here''s my code glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);// Clear The Screen And The Depth BufferglMatrixMode( GL_MODELVIEW );glLoadIdentity();// Reset The matrixgluLookAt(camx, camy,  10 ,0,0,0,0, 0, 1);renderBack();glPushMatrix();glRotatef( 90, 1, 0, 0 );  // these 2 rotates theglRotatef( 90, 0, 1, 0 );  // object so its uprightglRotatef( shipVertRot, 1, 0, 0 ); // this messes upglRotatef( turnRotate, 0, 0, 1 );// this rotates goodglTranslatef( shipOne.X(), shipOne.Y(), shipOne.Z() );renderShip( subship );glPopMatrix();I don''t why but the first rotatef( with shipVerRot or2nd to last glRotate always rotates along the world axisand not the axis of the ship. Can anyone help.  
  Try to image your ship in your brain.Think about how it should be transformed relatively to the (0,0,0) point. For example: first - rotate around Y (this is yaw), second rotate around X (this is pitch), then translate in actual position. And write all this commands in backward order, i.eglTranslate(...)glRotate(pitch, 1, 0, 0)glRotate(yaw, 0, 1, 0)  ;  You rotate and then translate. I find that translate and then rotate makes more sense and works much better. Mess with where your glTranslated(Ship position); is to see if that fixes the problem. nail''s idea makes sense and should work too...  ;  When you call glRotate, then glTranslate, they are applied to the object in the opposite order: first the object is translated, then those translated vertices are rotated around the origin.  ;  sjelkjd is right. Rotate then translate for the camera. Moving models in the world is the other way around. Confusing eh?;  ic thanks for your posts.  Somettimes I get so wired.The only issue is that rotation around one of the ships axises isok but the rotation around the other axis still gives me a rotation around the worlds axis and not the objects.  But I''ll hack on it some more.-Kenjin  ;  It''s a lot easier if you think of it like this: rotate, translate, and scale operate on coordinate systems not objects or vertices. The changes to a coordinate system accumulate in the order that they are executed. Everything is relative to current coordinate system. Forget the reverse order crap, it''s too confusing."glRotate(); glTranslate();" means rotate the coordinate system, then translate the coordinate system w.r.t. the rotated system."glTranslate(); glRotate();" means translate the coordinate system, then rotate the coordinate system around the translated origin.BTW, rotation and scale are always around the current origin.  