Re: [Algorithms] Dummie Matrix math questions
Brought to you by:
vexxed72
From: Aras P. <ar...@un...> - 2008-02-08 11:11:19
|
> http://www.toymaker.info/Games/html/camera.html > So, it appears that for the view, I will need to use the invert matrix after > fixing the code, thats weird to me, does anyone knows a tutorial / doc that > explain the math behind view matrix? That tutorial explains "how to get axis vectors and position from a matrix that is inverted". If you think about a camera as a regular object, then camera's matrix (camera-to-world) has a matrix just like any other object. In D3D's notation, first three rows are axes, 4th row is the position. More here: http://aras-p.info/texts/matrices.html A view matrix is NOT camera's matrix; a view matrix does the opposite transform (world-to-camera). Hence it's an inverted matrix of the camera. Now, an orthonormal camera can be inverted pretty easily; the rotation part just gets transposed, and the position part is "the negative dot product of the position and each of the axis vectors" (quoting your tutorial link). -- Aras Pranckevicius work: http://unity3d.com home: http://aras-p.info |