Lookat vector to Euler

Started by
0 comments, last by Sneftel 16 years, 4 months ago
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
Code makes the man
Advertisement
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).

This topic is closed to new replies.

Advertisement