Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I need help with the particle system! [Unity]

A topic by devCat created Jul 28, 2023 Views: 412 Replies: 18
Viewing posts 1 to 8
Submitted (1 edit)

For some reason, the particles go behind the background. I tried every solution I know, but cant seem to get it to work! I am using Unity 2022.3.5f1. Does anybody know the problem?  

Particles behind background:

Make sure in the sprite sorting layer for your particle system is higher than your ground

It's on the bottom of the list of parameters on your particle system.


Submitted

I have tried that, but did not work. Also, the background has its own layer.

(1 edit)

Is it below the layer the particle system is on? Like this: 

Submitted

This is my sorting layer. The particle is on Default.

Submitted

try changing a position of particle system. It might help

Submitted

What do you mean exactly by position of the particle system?

Submitted

change the z position in transform of particle system gameobject 

Submitted

That did not work.

Submitted

Is it a 2D project? If not maybe the particles are spawning behind canvas

Submitted

Its a 2d project.

It looks like your particles don't have a working material on them. Your particles are the magenta squares it that photo right?

Submitted

Yeah, but that was temporary because I did put materials on them before, just removed them trying to figure out the problem.

Just noticed that they aren't hidden behind the Red tiles, can you check what sprite layer the other tiles is on?

Submitted(+1)

The red is not tiles, its the camera background.

Strange, there's nothing else I can think of right now, Just double check that all of your sorting orders and layers are all correct.

Submitted

Still having issues? Here's three random thoughts hopefully one might help:

- Screen Space - Overlay canvasses will render in front of worldspace objects. If you want worldspace particles to render in front of an overlay canvas, I believe you will need to create a separate camera that only sees the particles (by separating layers and using the camera clear flags), and renders it on top of the previous camera.

- Material rendering queue - Higher numbers are rendered last, ensuring transparent objects are rendered on top of opaque objects. Make sure the material is queued at the Transparent level.

- Sprite sort order will apply last, and seems like you've already ruled this out. World space z should also work, but make sure you are moving it towards the camera (I usually put the camera at Z -10 in ortographic  projects, so for example, putting the world space z farther in the positive axis will actually push it further away from the camera.

Submitted (1 edit)

Are the particles within the clipping plane of the camera?

Submitted

If a sprite gets too close the camera, it will appear to vanish!