how do i extract the eye and up vectors from a view matrix?
thanks!
how do i extract the eye and up vectors from a view matrix?
thanks!
Hi,
If your modelview matrix is:
m0 m4 m8 m12
m1 m5 m9 m13
m2 m6 m10 m14
m3 m7 m11 m15
then:
(m0,m1,m2): X-Model in View coord.
(m4,m5,m6): Y-Model in View coord.
(m8,m9,m10): Z-Model in View coord.
(m0,m4,m8): X-View in Model coord.
(m1,m5,m9): Y-View in Model coord.
(m2,m6,m10): Z-View in Model coord.
Ido