- Home /
Particle rendered behind meshes/billboards?
I have a particle effect using sphere emitter that I want to render in front of some meshes/billboards but there are some problem with the rendering order which is pretty strange: it's rendered behind the mesh in the scene view and also the built executable, but it's rendered in front of the mesh in the game view (the actual game play in unity editor).
I'm using this in a 2D game so everything are on the same Z axis. EDIT: I also tried to adjust the Z value of those object so the particles appears in front of the object, but still no use.
So the funny fact is that it looks all good in my game view with particle rendered in front of the mesh in the unity editor but once I use build and run the render order have all gone wrong again. The particle and the mesh are having the exact same Z location.
What is the strangeness all about? Can I adjust the render order somehow such that it will appear in front or behind a mesh as I see fit?
And furthermore, can I adjust the effect such that if a particle spawns at the same location as the mesh, the particle order will follow the exact physical appearance? That is, some particles in front of and some particles behind the mesh since the particles are emitted from a point to all random directions?
Thanks
Are you saying that the Z coordinates are exactly the same? Because you will need to make sure that all of the billboard emitted from the sphere are infront of the thing you want them to obscure. Or are you saying none of them are in front, even though you would expect some, emitted from a sphere, to have a Z coordinate which is closer to the camera?
I'm making the particle in 2D space, XY plain precisely, so Z axis is the same for all objects. Edit: I even try to adjust the Z coordinates of the particle system so that it's definitely in front of the object but it's still rendered behind it. Again, this only appears in scene view and executable, the editor game view displayed correctly.
In 2D you still use Z as it affects rendering order. An orthographic camera just ensures it doesn't have any effect on the size of the object. Two objects with the same Z could be rendered differently.
I also tried altering the z value so the particle system appears in front of the object, but it still didn't work.