Hello Guest

Author Topic: Particle system rendered behind sprites?  (Read 17847 times)

ryf9059

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 41
    • View Profile
Particle system rendered behind sprites?
« on: June 21, 2013, 09:56:01 am »
I have a particle system that I want to render in front of a sprite, but the particle system always appears to be behind the sprite no matter what Z axis value I set, even I put the particle system obviously in front of the sprite.

Strangely, this problem happens in the scene view and the built executable, but not in the editor game view. 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. I try to figure out the problem but in the scene view it's still wrong, I don't know what to do.

Any advise? Thanks

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Particle system rendered behind sprites?
« Reply #1 on: June 21, 2013, 10:58:14 am »
It could be to do with the thickness of the particle system. If you move it really far away from the sprite in z, does it still sort incorrectly? I think (not 100% sure) that Unity uses the center of the emitter volume for sorting with the particle system. You can configure it so the z position is not the center...

imakeinternet

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Particle system rendered behind sprites?
« Reply #2 on: August 04, 2013, 05:48:41 pm »
Did this ever get sorted out?  I'm having the same issue and can't seem to figure out how to make it work.  I'm simply trying to display a prefab with some text and a couple particle systems behind it overtop of a tilemap and/or sprites.  Oddly enough the TEXT layer in my prefab displays above the tilemap but the particle system always shows behind the tilemap.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Particle system rendered behind sprites?
« Reply #3 on: August 04, 2013, 06:01:23 pm »
Try pushing it forward by a large amount? And if your tilemap is solid, make it use a solid shader - it should always sort correctly then.

imakeinternet

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Particle system rendered behind sprites?
« Reply #4 on: August 04, 2013, 06:19:21 pm »
Thanks for the super fast reply! :)  I'll give it a shot and report my results.

mitralone

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Particle system rendered behind sprites?
« Reply #5 on: August 05, 2013, 12:40:17 pm »
Hey I had this issue in many particle systems. It seems this is mostly related with the particle systems generation direction. When looking from camera angle, you can not perceive it correctly. Try to rotate the camera and see if the particle system is actually generating particles to the front of the sprite. You might have to play with the rotation of the particle system to get this to work and look correctly.

Also,  in the particle systems renderer tab, play with sort mode options if your sprite has transparency.

Hope this helps

Mitralone