Search Unity

Gaps between adjecent sprite tiles

Discussion in '2D' started by Hellothere_1, Sep 24, 2018.

  1. Hellothere_1

    Hellothere_1

    Joined:
    Sep 18, 2018
    Posts:
    32
    I'm currently working on a 2d block based building game.

    Unfortunatly whenever I build a plane of blocks this happens:



    As you can see the individual sprites are placed perfectly adjacent to each other in the scene view, but in the ingame view the game shows some periodic gaps between blocks that shouldn't be there.

    Here a closeup of the issue:



    I'm fairly certain the problem is the result of individual pixels being right at the egde between two sprites and thus not registering either sprite as fully "below" the pixel, but I'm not sure how to best fix this.

    The sprites have "point (no filter)" as filter mode and the issue exists both in the preview window and for fullscreen builds. (though the frequency and position of the stripes will depend on the chosen resolution)
     
  2. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
  3. PGJ

    PGJ

    Joined:
    Jan 21, 2014
    Posts:
    899
    Make a Sprite Atlas and put your sprites into it. That should solve your problem.
     
    hussein29 likes this.
  4. Hellothere_1

    Hellothere_1

    Joined:
    Sep 18, 2018
    Posts:
    32
    @PGJ Thanks, I'm still not completely sure exactly why, but that fixed the problem perfectly.