- Home /
Question by
Vinc · May 05, 2012 at 02:30 PM ·
screencoordinates
How to find min/max x/y coordinates?
Hi,
For a tile based 2D games, how can I find the min. & max. x/y coordinates based on the current screen resolution? In other words how can I find out how many tiles I can fit into the screen and were where the starting & ending x/y coordinates?
Comment
Best Answer
Answer by Berenger · May 05, 2012 at 02:48 PM
If the camera is orthographic, it can see, relatively, from -orthographicSize aspect to orthographicSize aspect in x and from -orthographicSize to orthographicSize in y. Or Z, depending on which direction you're looking at.
Your answer
![](https://koobas.hobune.stream/wayback/20220613071124im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Get the borders of screen 1 Answer
2D Game. Screen, Camera and coordinates. 0 Answers
world to screen coordinates conversion 1 Answer
TransformDirection gives the same coordinates as in input 0 Answers