         switch recognizer.state
         {
         case .Began:
-            self.initialEulerAngles = self.cameraNode.eulerAngles
+            self.previousPanTranslation = .zero
+            
+            let glkOrientation = GLKQuaternionMake(self.cameraNode.orientation.x, self.cameraNode.orientation.y, self.cameraNode.orientation.z, self.cameraNode.orientation.w)
+            let orientation = NSStringFromGLKQuaternion(glkOrientation)
+            print("Begin orientation: \(orientation)")
+            
+            let glkAngles = GLKVector3Make(self.cameraNode.eulerAngles.x, self.cameraNode.eulerAngles.y, self.cameraNode.eulerAngles.z)
+            let angles = NSStringFromGLKVector3(glkAngles)
+            print("Begin angles: \(angles)")
             
         case .Changed:
-            guard let initialEulerAngles = self.initialEulerAngles else
-            {
-                assertionFailure("Attempt to unwrap initialEulerAngles failed. These should not be nil.")
-
+            guard let previous = self.previousPanTranslation else
+            {
+                assertionFailure("Attempt to unwrap previous pan translation failed.")
+                
                 return
             }
 
             let translation = recognizer.translationInView(recognizer.view)
-
+            let translationDelta = CGPoint(x: translation.x - previous.x, y: translation.y - previous.y)
+            
             // Use the pan translation along the x axis to adjust the camera's rotation about the y axis.
-            let xScalar = Float(translation.x / self.view.bounds.size.width)
-            let yRadians = xScalar * self.dynamicType.MaxPanGestureRotation
-            let yCurrent = (initialEulerAngles.y + yRadians) % Float(2 * M_PI) // Mod by 360 in order to maintain 0 <= y < 360.
-            
-            // Use the pan translation along the y axis to adjust the camera's rotation about the x axis
-            let yScalar = Float(translation.y / self.view.bounds.size.height)
-            let xRadians = yScalar * self.dynamicType.MaxPanGestureRotation
-            let xCurrent = (initialEulerAngles.x + xRadians) % Float(2 * M_PI) // Mod by 360 in order to maintain 0 <= x < 360.
-
-            // Store the new values so they can be applied in renderer:updateAtTime:.
-            self.currentEulerAngles = SCNVector3Make(xCurrent, yCurrent, initialEulerAngles.z)
+            let yScalar = Float(translationDelta.x / self.view.bounds.size.width)
+            let yRadians = yScalar * self.dynamicType.MaxPanGestureRotation
+            
+            // Use the pan translation along the y axis to adjust the camera's rotation about the x axis.
+            let xScalar = Float(translationDelta.y / self.view.bounds.size.height)
+            let xRadians = xScalar * self.dynamicType.MaxPanGestureRotation
+            
+            let x = GLKQuaternionMakeWithAngleAndAxis(xRadians, 1, 0, 0)
+            let y = GLKQuaternionMakeWithAngleAndAxis(yRadians, 0, 1, 0)
+            let z = GLKQuaternionMakeWithAngleAndAxis(0, 0, 0, 1) // TODO: ???
+            let q = GLKQuaternionMultiply(z, GLKQuaternionMultiply(y, x))
+
+            self.cameraNode.orientation = SCNQuaternion(x: q.x, y: q.y, z: q.z, w: q.w)
             
         case .Ended, .Cancelled, .Failed:
-            self.initialEulerAngles = nil
-            self.currentEulerAngles = nil
-            
+            self.previousPanTranslation = nil
+            
+            let glkOrientation = GLKQuaternionMake(self.cameraNode.orientation.x, self.cameraNode.orientation.y, self.cameraNode.orientation.z, self.cameraNode.orientation.w)
+            let orientation = NSStringFromGLKQuaternion(glkOrientation)
+            print("End orientation: \(orientation)")
+            
+            let glkAngles = GLKVector3Make(self.cameraNode.eulerAngles.x, self.cameraNode.eulerAngles.y, self.cameraNode.eulerAngles.z)
+            let angles = NSStringFromGLKVector3(glkAngles)
+            print("End angles: \(angles)")
+
         case .Possible:
             break
         }

        }

        self.player = AVPlayer(URL: url)

        // Video node
        let videoNode = SKVideoNode(AVPlayer: self.player)
        videoNode.position = CGPoint(x: size.width / 2, y: size.height / 2)

    /// The pan gesture used for navigation.
    var panGestureRecognizer: UIPanGestureRecognizer!
    
    // TODO: Add doc
    var previousPanTranslation: CGPoint?
    
    /// The motion manager used to adjust camera position based on device motion.
    let motionManager = CMMotionManager()
    
