title: OpenGL - Mouse coordinates to Space coordinates
body: <p>My goal is to place a sphere right at where the mouse is pointing (with Z-coord as 0).</p>
  
  <p>I saw this <a href="https://stackoverflow.com/questions/7692988/opengl-math-projecting-screen-space-to-world-space-coords">question</a> but I didn't yet understand the MVP matrices concept, so I researched a bit, and now I have two questions:</p>
  
  <p>How to create a view matrix from the camera settings such as the lookup, eye and up vector? </p>
  
  <p>I also read <a href="https://www.3dgep.com/understanding-the-view-matrix/" rel="noreferrer">this tutorial about several camera types</a> and this one for <a href="http://webglfactory.blogspot.pt/2011/06/how-to-create-view-matrix.html" rel="noreferrer">webgl</a>.</p>
  
  <p>I still can put it all together I don't know how to get the projection matrix also...</p>
  
  <p>What steps should I do to implement all of this?</p>