Now that you mention that I checked over my code.
I oversimplified it apparently, and also I haven’t actually used rotation in mine.
Sorry about offering the advice that ultimately is wrong.
There’s probably a 3rd superior version of this that I’m unaware of
Now that you remind me of this extra issue(s) I might recommend going back to using the Camera and transforming its matrices???
Anyway, I would probably work on the math for updating the anchor point + position such that you can rotate it around the anchor point at the center of the screen.
In our game(s) I’ve only done panning and zooming. In that case I have to map from screen center (or pinch center) to world coordinates and when zooming I did need to add an offset based on the new zoom scale position delta that occurs when scaling.
I just use anchor 0,0 and have world coord 0,0 == root node’s position.
From my experience it really just all comes down to math, and for me drawing things out.
Also, for zoom/rotate you’ll probably have to do an inverse position (to move to some “center”), do the scale/rotate, and then re-position back. The net effect of this would be similar to using the anchorpoint instead. The key again will be to not have the game world jump around due to zoom/rotate.
I can probably post my PanZoomLayer and my CameraManager if you want to check it out.