Sign in to follow this  
xsirxx

About quaternion roations used in cameras..

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
*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

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