Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello Maaot. I am very curious about how the effect of fog between layers is implemented. Is it a particle? How do you need to set parametersis fog made by particle? Does fog use sprites?

(+1)

Hi ! The fog effect on unity does not work for 2D, so to achieve a fog/distance effect you have to do some tricks.

- First, you can have a particle system that spawns a sprite of a giant cloud ( if it is round it works fine ), this cloud could be spinning, be semi-transparent, spawning in different sizes, spawning from left to right so it simulates wind... This particle system also can go on different sorting layers, on the foreground... the background, on a ever further background and so on.

- I also place over the background I want the fog, a giant square sprite gameobject with plain color and some transparency, to visualize this method imagine you just place a big layer of transparent paint over your background. You can also stack this one.

- And last, you can achieve some blur with post processing, and two different cameras.