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?
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.