Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Particles and identification of the player

Discussion in 'Scripting' started by xxshazxx, May 20, 2020.

  1. xxshazxx

    xxshazxx

    Joined:
    Oct 13, 2019
    Posts:
    4
    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
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
  3. xxshazxx

    xxshazxx

    Joined:
    Oct 13, 2019
    Posts:
    4
    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