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 site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
4 People are following this question.
Orthographic cameras and screen resolutions
Why Is My Orthographic Camera Not Rendering at the Full Resolution?
Orthographic camera cuts off half of screen in Web Player - resolution error?
Camera view different screen sizes?
change size of orthographic camera