Skip to content →

Getting the scene boundaries with an orthographic camera in Unity

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.

Published in Snippets


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.