Question About Units
Ok so I'm incredibly confused as to how units work in Unity. I've got a 2d game with a scene that's 1920x1080px. I want to place a square that's 120x120px in the upper right corner of the camera space, so I would assume that I would take half of 1920 (960) and half of 120 (60) and subtract 60 from 960 to get 900. I'd think to do the same with the y coordinates and get (900, 480), but since everything is measured in units, my simple math doesn't mean anything. I've already read around and seen that there's this thing called "Pixels per Unit" and I've tried messing around with it, but it doesn't really help with my problem. I guess what I'm basically asking is how do you determine how many units wide is the orthographic camera if the screen size is 1920x1080? If I can figure that out then I should be able to do the rest.
Answer by hexagonius · Feb 23, 2017 at 07:04 AM
the height:
2 * orthographic size * pixels per unit
width:
the same * aspect ratio
So that would mean that my screen size would be ~17.77x10 since my camera size is 5. Okay, thanks for your help! I think I get it a bit more now.
Your answer
Follow this Question
Related Questions
Placing a rectangle above ad 0 Answers
Pixel Perfect Camera help 0 Answers
Pixels to units? 0 Answers
Pixels per unit and resolution 1 Answer
How set 2D velocity in pixels? 1 Answer