title: LWJGL Matrix lookAt method
body: <p>I need help with calculating the lookAt method
  Here is my method</p>
  
  <pre><code>    public void lookAt(Vector3f position, Vector3f direction, Vector3f up) {
      Vector3f f = new Vector3f();
      Vector3f u = new Vector3f();
      Vector3f s = new Vector3f();
      Vector3f.sub(direction, position, f);
      f.normalise(f);
      up.normalise(u);
      Vector3f.cross(f, u, s);
      s.normalise(s);
      Vector3f.cross(s, f, u);
  
      this.setIdentity();
      this.m00 = s.x;
      this.m10 = s.y;
      this.m20 = s.z;
      this.m01 = u.x;
      this.m11 = u.y;
      this.m21 = u.z;
      this.m02 = -f.x;
      this.m12 = -f.y;
      this.m22 = -f.z;
      this.m30 = -Vector3f.dot(s, position);
      this.m31 = -Vector3f.dot(u, position);
      this.m32 = Vector3f.dot(f, position);
  }
  </code></pre>
  
  <p>but when I test it like this <code>camera.lookAt(position, new Vector3f(1, 0 ,0),  new Vector3f(0, -1, 0));</code> my camera is looking down, end if only i do this <code>camera.lookAt(position, new Vector3f(10000, 0 ,0),  new Vector3f(0, -1, 0));</code>, camera is looking forward. Can you help please ?</p>
  
  <p>P.S. sorry for my english</p>