Hi all, I don’t know if this is the right forum where to post my question. I’m not even using openGL, but I’m writing a matrix class that follows the same layout and conventions than openGL, so I hope to receive halp here.
I’m writing a LookAt method with the following code:
I searched all over the web for the formula. I used the one specified in the DX reference for right handed matrix, as well as many other places. This one just flips my y axis.
With the following parameters I expect to ge the identity matrix:
eye = (0,0,0)
target = (0,0,-1)
up = (0,1,0).
But the element in (1,1) is -1 instead than 1.
Where am I wrong?
Thank you!
I gave a look to the library written by Trenki. It will be of inspiration for me (expecially for some more operations over vectors and matrices that I may add to my own library) but it did not help me with my specific problem: as I said, I’ve tried many different versions, but even while I can set it up to retutn the identity matrix in the previous example, I still don’t know if this would be a correct matrix or not.
Is there someone willing to check my code? Perhaps I made something wrong in other parts (cross mult i.e.)?