- Home /
forcing camera to see 800 x 600 world coordinates
Any way to force the camera to see only 800 x 600 world coordinates at z = 0 ?
edit: (actually, z coord isn't important as long as the camera is looking straight down a z-line with orthographic projection)
Answer by Statement · Feb 21, 2012 at 05:54 PM
Set the Cameras Projection to Orthographic, Size to 300 (half of the height) and make sure your view is forced at 4:3 aspect ratio, then just point it down Z.
For some reason my edit wont update. Size should be 300, it's the half of the height you want to have.
I'm fairly certain that's what I tried but my debug message was returning exorbitantly large x and y positions. I'll try it again in the morning and see if my debug messages were off somehow.
Yeah, that was it, I forgot to change my debug message after messing around with everything else. Thanks.
Answer by Berenger · Feb 21, 2012 at 05:57 PM
After some experiment, The area the camera can see is dependant on the size and the viewport size. With a viewport 500500, a size 250 will give you a 500500 world unit area. I think it's something like (size 2 ratio, size * 2 ).
Conclusion, Try a camera of size 300 with a viewport ratio 4/3, such as 800*600.
Your answer
Follow this Question
Related Questions
2D Game. Screen, Camera and coordinates. 0 Answers
Fixing the camera's left side in a 2D Game in all screen resolutions 0 Answers
2D terrain with pixel perfect and dynamic camera 0 Answers
Camera fix with resolution 0 Answers
Camera viewport should be square and pixel-perfect, regardless of player aspect ratio. 0 Answers