Say you have a Quaternion that is rotating a model up around the X axis (in world space), but you want it to rotate up from whatever perspective the camera is looking at the model (just an example, the Quaternion could represent any sort of rotation). How can you modify it?
I have tried this, with very promising results, but it only really works if the model is in the center of the camera view. The further its position is the from the center, the less accurate it is (it spins up some angle slightly tilted away from the camera forward).
Quaternion cameraQuaternion = Quaternion.CreateFromRotationMatrix(camera.view);
modelRotationQuaternion = Quaternion.Inverse(cameraQuaternion) * modelRotationQuaternion * cameraQuaternion;
Presumably this needs to take the FOV or some such into account, but I’m having a very hard time nailing down any solid information about it.