[answered - sorta] 2D Roguelike tutorial - how to fix black dotted line between middle rows without moving the camera

Hi all,
I’m doing the 2D roguelike tutorial and noticed a weird black dotted line between the 4th and 5th rows of game tiles. It’s 1 pixel thick so it’s kind of hard to see but here’s a pic:

It seemed pretty similar to this ask so I tried doing what they said (editing the material of the sprite renderer to snap-to-pixel) and I got that line between every row rather than just between the middle two rows.

Then I realised that actually the line is there in the tutorial videos as well! After some thought about what was special about that row I tried moving the camera a bit, and the line goes away. So I guess that when the camera is right above two tiles that don’t overlap, sometime it renders a gap even if the tiles don’t have a gap? Is there a fix for this that leaves the camera in the centre?

Hope this still comes in handy.

As opposed to changing the tileposition to overlap for visual effects, which I thought would cause problems in calculating positions, I instead took the Main Camera and set its rotation-X-value to 0.1

This clears the black lines but leaves the grid perfectly aligned, without visible impact on the position of the camera.

Initial setup

This is the MainCamera setup as instructed in the tutorial. you can see the black lines in the gaps between tiles. NOTE: the scale of the screen actually also affects where the lines can be seen.

After camera rotation

Here the camera is rotated. The blacklines disappear in all scales and there is insignificantly little impact on the camera.

This is complex. Try overlapping the rows to try to cover up the lines.

You can try submitting a Unity bug and explain that the ugly lines show in the tutorial as well.

This didn’t work for me, but what did was altering the aspect ratio of the game window from free aspect to 16:9 which is that of my monitor.

,Set ‘Filter Mode’ to ‘no filter’