I want to develop a game for a standard 16:9 resolution. To reach this i set my game output screen to 16:9 so i could see what the final product would look like. I also want to have the left bottom corner as (0, 0). To accomplish this i moved my camera until the bottom right corner was 0, 0. My camera is now at (8,9; 5), which seems realy weird to me. Shouldn’t the camera be at 9.6; 4.5. Or at least somewhere in the 16:9 range. The current aspect ratio is 89;50 if my calculations are correct.
Am i looking at this wrong?
I can’t reproduce your case. First of all Do you actually use a perspective camera or an orthographic? Having 0,0,0 at the bottom left doesn’t make much sense for a perspective camera. Though even with a perspective camera when I “roughly” move the camera so 0,0,0 appears in the lower left corner i get a position of x: 10.07, y: 5.65 and z = -10. This is a ratio of 1.782 which is about “16.04 : 9”.
Since this was just a “visual” placement it’s of course not really precise. You can calculate the position you need yourself. The y offset is:
y = -z * Mathf.Tan(Camera.main.fieldOfView*Mathf.Deg2Rad/2);
x = y * 16f/9f;
For a camera with a fov of 60° and a z position of “-10” (default position) this gives you:
y = 5.773503f
x = 10.2640048f
This way the point (0,0,0) is at the bottom left corner for a 16:9 resolution
For an orthographic camera it’s even simpler:
y = Camera.orthographicSize;
x = y * 16f / 9f
Note that this only holds true for a “non-rotated” camera.