- Home /
1px Gap Between 2D Sprites
I am creating a 2D game that consists of 2D tiles. Each tile is exactly 1 unit by 1 unit, and they are offset exactly 1 unit apart. However, when the camera moves around, there is occasionally a 1 pixel gap between random sprites. Is there any good way to fix this?
I have the same problem. Running it in the editor caused gaps to appear between my sprites. But, when I actually build the project and run the builds as a desktop application or android app, the gaps never appeared. I think it has something to do with how they optimize the in editor preview.
What are your texture settings, and are you using a texture atlas, and does it have padding in it? If you are using sampling other than Point sampling, is there enough UV texture offset from the edge of the texture to prevent reading samples outside the texture?
Try turning off mipmapping on your texture. Does it still do it?
It's set to a Sprite using the Sprite $$anonymous$$ode of $$anonymous$$ultiple. I don't see an option to disable mipmapping. It is using the Point filter mode.
Answer by Mehrdad_G · May 03, 2016 at 01:54 PM
In The Name Of GOD our world is the same,isn't perfect.so change that ratio to 0.99 then all will be fixed:P too late for answer but i had same problem to today.god helped i put this here for the next person.hope you create games that make world better place:)
Answer by JeremyComelli1 · Dec 12, 2018 at 03:08 PM
A bit late, but you can turn off Anti-Aliasing in Edit->Project Settings -> Quality. You can also try to resize your camera (A scale of 4.0 did it for me, but any whole number should do)