I'm a little uncertain as to how the size of an orthographic camera affects screen resolution.
Basically I'm creating a HUD/UI elements for a game using a base screen resolution of 1920x1080. I've had some issues when bringing over images and icons from photoshop, that were creating according to my desired screen resolution.
Can someone tell me what size I should be setting my camera for in the Orthographic Camera settings?
Thanks a ton. millye
Posts: 6 Joined: Thu Mar 31, 2011 12:36 pm
Answer by bernardfrancois
Oct 10, 2011 at 09:51 AM
If you're using a separate camera for your HUD/UI, you could set the orthographic camera size to 1080 / 2 = 540.
This would allow you to set the scale of your HUD objects to be the pixel dimensions of your images.
Basically, the orthographic size value represents the amount of in-game units (meters) half of your vertical screen size takes.
Thanks I had always assumed this but never true knew :D
Answer by jdeg19
May 09, 2014 at 04:09 AM
Answer by podlec
Apr 02, 2014 at 09:39 AM
I'm really puzzled by this. I've seen a few suggestions that orthographic camera size is screen height/2. In my scene, it was set to 5 by default, and the resolution became correct when I changed it to 3. How do I actually compute the right value?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
3 People are following this question.
Orthographic cameras and screen resolutions
Camera view different screen sizes?
Why Is My Orthographic Camera Not Rendering at the Full Resolution?
2D Aspect Ratio Of Camera
Change camera ortographic size to fit the content