I'm currently using a perspective tk2dCamera in my project and I'm trying to implement zooming through the ZoomFactor, which is so far working exactly as expected.
However, what I want to do is (all within one frame):
- Find ScreenToWorldPoint of the mouse's screen position for the current ZoomFactor. This is fine
- Temporarily increase the ZoomFactor
- Find ScreenToWorldPoint of the mouse's screen position for the newZoomFactor. But ScreenToWorldPoint doesn't seem to be updated
- Revert back to the original ZoomFactor
- Do something over the next few frames, using these two world points, to do some zooming in and panning.
I've tried using a new Camera with .CopyFrom(my original tk2dCamera), as well as using .ResetAspect(), .ResetProjectionMatrix(), and .ResetWorldToCameraMatrix(). So far I can't seem to get anything to work. It seems to need the camera to render at the new ZoomFactor, but that's exactly what I'd like to avoid.