# quaternion rotation matrix

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

## Recommended Posts

hi all , i wonder if i can extract my view vectors from a rotation matrix builded by a quaternion that is : qRot = qYaw*qPitch*qRoll // Combined rotation quaternion and i build a rotation matrix from qRot. can i get the column of the matrices as my Up Right and Look Vectors for the camera ? thanx for your help

##### Share on other sites

The longer answer is that there are a few different issues involved, such as quaternion multiplication order, row and column vector convention, and whether you extract the basis vectors before or after inverting the view matrix (if inversion is necessary). So a more accurate answer might be, you can get the view vectors from one or the other of the rows or columns, depending on the circumstances.

I might also mention that the use of quaternions in this example doesn't serve any purpose to speak of; you could just as easily accomplish the same thing with matrices alone.

##### Share on other sites
Quote:
 Original post by jykI might also mention that the use of quaternions in this example doesn't serve any purpose to speak of; you could just as easily accomplish the same thing with matrices alone.

I want to interpolate rotation easily that's why i use quaternions ...

when i pitch past pi/2 , i get strange behaviors , when i only do yaw without pitch it is okay...

can you explain more about the circunstances under you cannot extract the basis vectors ?

thanx

##### Share on other sites
Quote:
 Original post by ninican you explain more about the circunstances under you cannot extract the basis vectors ?thanx

Google for quaternion euler angles. The first link that seems pretty useful is http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/index.htm

1. 1
Rutin
27
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633313
• Total Posts
3011316
• ### Who's Online (See full list)

There are no registered users currently online

×