Arcball Rotation with Quaternions (using iOS GLKit)
I'm looking for a simple implementation for arcball rotation on 3D models with quaternions, specifically using GLKit on iOS . So far, I have examined the following sources: Arcball rotation with GLKit How to rotate a 3D object with touches using OpenGL I've also been trying to understand source code and maths from here and here . I can rotate my object but it keeps jumping around at certain angles, so I fear gimbal lock is at play. I'm using gesture recognizers to control the rotations (pan gestures affect roll and yaw, rotate gestures affect pitch). I'm attaching my code for the quaternion