Sprites leaving trails when i move them in game view (2d)

Hi guys,

i recently started using multiple cameras and culling masks and i have a strange behaviour when i inserted a new camera. When i move the object in scene, it leaves trails in game view. Everything is good looking when i play though. I noticed the problem goes away when i set clear flags to something other than don’t clear. I looked up unity manual, but it’s very poor regarding this matter, it only tells what to clear when rendering a camera. To be honest, i don’t know what it means.

Any help on the usefulness of clear flags and the proper setting would be useful, thanks.

As the docs say about Don’t Clear, “This mode does not clear either the color or the depth buffer. The result is that each frame is drawn over the next, resulting in a smear-looking effect. This isn’t typically used in games, and would likely be best used with a custom shader.” Seems clear enough. (Er, pun not intended.)

–Eric

3 Likes

@Eric5h5

Thank you, it makes perfect sense :slight_smile: