   Camera heading
  Hello!Can anyone please tell me what is the proper way of updating the heading of my camera whenever I do a rotation? Initially I have a heading of [0, 0, -1]; if I look straight to the left, I''ll have [-1, 0, 0]; if I look straight up the heading will be [0, 1, 0]. Things start to get messy whenever I compose the rotations (let''s say I first look left, and then I look up) i.e. the heading get''s a weird value. The "equations" I use are quick-hacks (based on preliminary observations) and obviously don''t work. Can anyone help me with the good equations or point me to some docs/tuts/etc?Basicaly what I need is a way of updating the Heading (and eventually Up+Right) vector(s) when I rotate around.Thanks for reading.PS: I use OpenGL for rendering if that makes a difference, although I strive to maintain API independence. 
  You are experiencing Gimbal Lock, which occurs because you rotate your view/object/matrix such that two axes become coincident. Being careful, you can avoid this problem. Alternatively, you could use quaternions, though I consider them unnecessary. ;  Thanks for your reply! I looked up the "Gimbal Lock" and found out that it can be avoided by the use of quaternions. But the problem still remains to extract those vectors from the quaternion (at least two, the third being the cross product of the other two). Any ideas? I can''t quite figure out quaternions... 