I need to calculate world point from screen coordinates for orthographic camera. Normally I would use Camera.ScreenToWorldPoint method and be happy with it, but I need to calculate this point for camera with ortographic size different from current one. How would I go about this?

Here is exactly what my problem is in case I’m overthinking and there is a simpler solution.

- I have a point in world space.
- I have a square on UI with it’s upper-left corner “connected” to world space point
- I want to move my camera so center of that point is in the middle. Easy one, I calculate world position for that center and I move my camera there.
- I want to change the camera to some orthographic size (that I know beforehand) while it’s moving.
- Problem: when I’m changing the size there is some offset created and world position I calculated beforehand is no longer valid