• Advertisement
Sign in to follow this  

About quaternion roations used in cameras..

This topic is 4763 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

I just posted in another thread about my camera, and I noticed I should mess with it a bit, so I did and found if I use : D3DXQuaternionRotationYawPitchRoll(&QUAT, DegreesToRadians(vecRot.z), DegreesToRadians(vecRot.y),DegreesToRadians(vecRot.x),); My rotations get all messed up when I change 2 at once from 0 degrees. Yet if I do this: D3DXQuaternionRotationYawPitchRoll(&QUAT, DegreesToRadians(vecRot.z), DegreesToRadians(vecRot.y),0.0); D3DXMatrixAffineTransformation(&matAT, 1.00f, NULL, &QUAT, &vecCameraSource); D3DXMatrixRotationZ(&matRot, DegreesToRadians(vecRot.x)); D3DXMatrixInverse(&matView, NULL, &matAT); matView = matView * matRot; My rotations work absolutely fine, except for the fact that my frustum culling gets messed up from using a matrix rotation(gimbal lock.) Any ideas why this is happening? thanks. [Edited by - xsirxx on February 9, 2005 2:35:39 AM]

Share this post


Link to post
Share on other sites
Advertisement
*SHAMELESS BUMP*

Anyone have any idea? Better yet, has anyone gotten thsi function to work with all 3 values placed in?


Thanks

Share this post


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

  • Advertisement