- Home /
Orthographic Camera settings for a 2D game
I'm starting out a 2D wrestling game and i need some help. The default resolution of game needs to be 320x240. The background sprite that i would be using is 640x480. The camera would move over the background to give it a hovering look. I want the Camera to cover exactly 320x240 resolution. I tried setting the Camera size to 1.2 and it looks approximate but i wanna be sure that the camera is exactly 320x240. By default all the images are set to 100 Pixels per Unit. Also, i would like to change Filter mode for all images to point mode all together. I know i can set it for an individual image in inspector but i need a way to set it together for all images since i have a lot of them. So my question is,
How to set the camera to cover exactly 320x240
How to set image properties like Filter mode for all images in the project
Hi, there are lots of tutorial on how to setup a scene with pixel perfect sprites and camera (searching for "pixel perfect" should give you some results)
For the second point: you can modify parameters when selecting multiple textures at the same time in the project window. If your textures are in multiple subfolders, you can apply a filter for name and asset type before multi-selecting. For example: searching for "t:texture green" will show all textures that have "green" in their name. Lastly, scripting can also help set import settings to any/all object, check TextureImporter.
Answer by Nikaas · Jul 28, 2015 at 09:11 PM
Your orthographic camera size depends on the pixels per unit of your sprites.
Orthographic camera size is equal to 1/2 of the vertical units (meters if you use built in physics) you will see on the screen. Say size 6 means that your screen height will be 12 units.
The formula is: screen resolution / 2*orthographic size = pixels per unit on sprites
Filter depends on your preferences - for low res you probably want "point".
Your answer
Follow this Question
Related Questions
Orthographic camera movement clamping 1 Answer
Making a camera semi-orthographic 2 Answers
2D Camera sizing and movement 0 Answers
parallax scrolling using orthographic camera 1 Answer
Dynamic Orthagraphic Camera Zoom 1 Answer