I'm implementing multi-touch camera control in SpriteKit using UIKit gesture recognizers, and I have troubles making pan and rotate work intuitively together.
From a user interface perspective, the goal is:
- A pan gesture moves the scene as you'd expect, adjusting for camera rotation.
- A pinch gesture scales the scene as you'd expect, with the camera zooming in and out from the midpoint of the gesture, not the view center.
- A rotation gesture should rotate the scene as if it were a piece of paper that you manipulate with two fingers. The gesture midpoint at the start of the rotation defines the rotation pivot.