When you are working in a 2d / 3d game, and you want to get the coordinates of the edges of what the orthographic camera sees, you can use these piece of code to calculate them. I must state that I subtract 0.5f from each side, since my object has a scale of 1 and it slipped half of it of the screen.
Feel free to use it on your own projects.
Comments