In my game i have bunch of sprite sheets. In my player sprite sheet i have 2 sprites and i have sliced then properly so that only one sprite is at one 21x21 block and does not overlap others. the sprite is close to the border. so when use it in the game, once in a while unity shows a line of pixels that are from the next sprite when camera is moving. I found a fix to it by adding a transparent line of pixels around the sprite and centering my actual character images. i can do this for player character, but i get into problems with tilemap collider when i do this for other sprite sheets for the map, etc. i tried to add transparent line around those also but even then i get into problems with tilemap collider that does not ignore the transparent part of the sprite and adds collider lines around that so it is a big mess with my project now.
![alt text][1]
here is my sprite in sprite sheet. i drew two lines red and green to show what i'm trying to say.
![alt text][2]
here is in game view of that line. which you see in the sprite sheet that i don't have it as a part of my sliced sprite.
note that line don't constantly appear, it appears once in a while. it looks to me more like a bug in unity. almost looks like the gameObject glitched for a millisec when playing.
i hope the pics made what i'm trying to say a bit clearer. i'm using latest unity 2018 lts version i have all the settings set right using the warp mode to clamp, filter to point. compression to none and ofcourse the sprite mode set to multiple and dimensions for slicing set properly. please tell why this happens and how can i fix it. I've been trying to fix it without hacks for a week and it's annoying me.
[1]: /storage/temp/151616-82505609-1635358456606290-6336535422688034816-n.jpg
[2]: /storage/temp/151617-83297587-1635357086606427-6416231968249217024-n.jpg
↧