title: Effective way to calculate the up vector for gluLookAt which points up the y-axis the most?
body: <p>I need to create an up vector for when the camera looks at any angle (except directly down or up because the up vector would be perpendicular to the y-axis).</p>
  
  <p>The up vector has to be perpendicular to the line of sight of-course. When the line of sight isn't along the y-axis, you can imagine a circle around the eye and the line of sight where the up vector could be. On this circle, there will be a point which goes further up the y-axis than any other point. This is what I want my up-vector to be.</p>
  
  <p>I'm sure I can work out a solution but I'm guessing people would have done this plenty of times before and I want to have the most effective solution. </p>
  
  <p>My camera, when using this at least, wont look directly down or up the y-axis so there is no problem there.</p>