Question about tilemaps, tiles and pixel per unit.
I’ve been working with Unity for about a year. And I still can’t figure out one problem - the gaps between the tiles.
Can you explain to me what I’m doing wrong and how I should do it?
Let all my tiles be squares (for example). I need squares measuring 128x128 pixels.
I draw a picture with these squares. I load it into Unity and cut it into tiles.
- I do not change the pixel per unit (it is 100).
- Disable compression and filtering.
- I add a picture to a sprite sheet with compression and filtering disabled. I draw with tiles on a grid.
There are almost no gaps between tiles. But sometimes a gap appears.
What to do?
PS
On my stage, everything must be proportionate. Therefore, I do not change the pixel per unit (it is 100). If the tile is 128, then this means the tile is 1 meter 28 centimeters high (for example, a picture of a fence).
If I add more tiles to another grid, for example 32x32 pixels, then there will also be a pixel per unit of 100. And these tiles will be 32 centimeters high (for example, a picture of grass).
These 2 grids and proportionality will provide a real look on the stage - a fence with grass.