Sign in to follow this  
Medo Mex

Extracting LookAt Vector from View Matrix

Recommended Posts

L. Spiro    25619
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
JohnnyCode    1046

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this