I've got the camera and sprite movement set up to make the game 'pixel perfect', but as soon as either the horizontal or vertical resolution is set to an odd number, the pixels start shrinking and stretching.
I've tried budging the camera up or down by half a pixel to try and fix it, but this doesn't help.
Anyone else encountered this issue? Thanks for any help.
You know what, I just made a mistake in the code for nudging the camera - that does fix it. To correct another error as well, the height value makes no difference.
If anyone else has the same issue, just nudge the camera across (left or right) half a pixel if Screen.width is odd.
If someone wants to copy and paste this comment into an answer, I'll mark it answered.
If at all possible, resolutions should always be POT (power of two).
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.
Should I change the Pixel To Unit ratio in a 2D Project?
Pixel Perfect in different resolutions
World space to pixel space accuracy
How to de-pixelize pixel art (smooth out) 2d
How to letterbox the screen and have pixel perfection in a 2d game