Using an SKCameraNode which works great for panning SKScene content larger than view size with Pan gesture. Also have a working constraint on the camera so it can't move beyond the scene content. Scene content can also be Zoomed in/out by scaling camera in a pinch gesture handler, great.
However if the the camera scaling is greater than 1 the camera shows the black space outside the scene content to fill the scaled content in view at the scene edge. This makes sense as the max distance to the edge the camera should be allowed is a function of zoom level but does anyone have any clever maths or patterns for this?
E.g. Does it mean redoing the constraint retangle every pan or is it best to transition the camera on pinch/zoom, is there a better way?
Any help appreciated.
dd