Sign in to follow this  
NiteLordz

Lookat vector to Euler

Recommended Posts

i am missing something and it's buggin me. i have a lookat vector defined as such vec3 vLookAt = vec3( 1.0f, 0.0f, 0.0f ); // Look +x direction now how do i get the Euler angles for each wx, wy, wz. thanks much

Share this post


Link to post
Share on other sites
One way is to construct the matrix, then extract the euler angles from it. The other way, given a suitable order of rotations, is to convert the vector to spherical coordinates and take theta and phi as two of the angles (the third angle being zero).

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