D3DXMATRIX RotationAroundLook, RotationAroundUp, RotationAroundRight;D3DXMatrixRotationAxis(&RotationAroundLook, &Look, DeltaRoll);D3DXMatrixRotationAxis(&RotationAroundUp, &Up, DeltaYaw);D3DXMatrixRotationAxis(&RotationAroundRight, &Right, DeltaPitch);D3DXVec3TransformCoord(&Look, &Look, &(RotationAroundRight * RotationAroundUp) );D3DXVec3TransformCoord(&Up, &Up, &(RotationAroundRight * RotationAroundLook) );D3DXVec3TransformCoord(&Right, &Right, &(RotationAroundUp * RotationAroundLook) );
I thought this was working as intended until recently (today). I realised that when I move the mouse in a circular motion (which should only change the Yaw and Pitch of the camera), the image rotates around the Look axis, so after many similar cicular movements it ends up upside down...
Why is that happening and how can I implement proper camera control with Yaw, Pitch and Roll? (Actually I'm happy to dispense with Roll if it helps).