Sign in to follow this  

Extracting LookAt Vector from View Matrix

This topic is 1852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Create the following matrix:
[CODE][ cam._11 cam._12 cam._13 0.0]
[ cam._21 cam._22 cam._23 0.0]
[ cam._31 cam._32 cam._33 0.0]
[ 0.0 0.0 0.0 1.0][/CODE]

Multiply the object’s world matrix by this matrix to get the final world matrix.


L. Spiro

Share this post


Link to post
Share on other sites

maybe you could transform 0,0,1 vector (or any) by the view matrix. Resulting vector should be pointing in the direction of view, considered it to be a world space vector. It might be performance wiser operation then decomposing view matrix.

Share this post


Link to post
Share on other sites
Sign in to follow this