Particles and identification of the player

Hello everybody,

I’m quite new to Unity and I’m trying to make something simple. I have setup a firethrower weapon with a particle system to have the fire effect.
I’m now trying to find a way to not “burn” the player with his own fire. I’m using OnParticleCollision to detect when I’m burning an enemy which is another player like me.
How can I avoid to burn myself as well? Is there a way to detect the source of the particles or is there a better way to do it?

Thanks a lot
Regards

You could use layers to identify the player and the enemies. You can configure collisions to ignore certain layers.

Hi Karl,

thank you so much for your help. What I’m trying to do is a multiplayer game and in this case how can I do it?
I don’t think putting each player in a different layer would be a good idea, right?
Thank you again
Regards