Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ty_alpha

Pages: [1]
1
Support / Re: ZoomFactor and Updating ScreenToWorldPoint
« on: March 26, 2014, 03:55:57 pm »
Thanks - that's exactly what I needed.

2
Support / ZoomFactor and Updating ScreenToWorldPoint
« on: March 25, 2014, 08:10:40 pm »
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.

Pages: [1]