8 hours ago, scippie said:What I mean is that quaternions don't work in the yaw/pitch/roll sense. I know you can construct a quaternion from them, but then you could as well be using matrices and have gimbal lock problems.
I'm not sure based on the above whether you're operating under this particular misconception (if not, apologies, and please ignore this), but I'll go ahead and mention that quaternions and matrices don't differ from one another with respect to gimbal lock. You can both encounter and avoid gimbal lock with each, and for the same reasons. (Historically at least there's been a fair amount of confusion about this, so I think it's worth clarifying.)