Skip to main content
GameDev.net gamedev.net
🔒 Locked

Camera Look at vector

Started by hagen May 8, 2003 at 7:46 PM 2 replies 2.5k views
Original Post
hagen
hagen
Hello people. Can anyone please tell me how to get/extract the look at vector or view direction from my camera, given a projection and view matrices? /\ /__\ C.Z. Hagen I want to play with MetallicA!
//__ C.Z. HagenI want to play with MetallicA!
JohnBolton
JohnBolton
If your notation is v'' = vM and the camera points in the +Z direction (D3D), then the look vector is the third row of the view matrix. If your notation is v'' = Mv and the camera points in the -Z direction (OpenGL), then the look vector is the negative of the third column of the view matrix.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
Arch@on
Arch@on
It is the N column or row in the matrix. Search for UVN camera at the articles section.
hagen
hagen
Ok, thanks for the tips, I will try that, and
post my results later on the day.



/\
/__\ C.Z. Hagen
I want to play with MetallicA!
//__ C.Z. HagenI want to play with MetallicA!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.