Search Unity

Making rain in a top down game

Discussion in '2D' started by Deeblock, May 24, 2018.

  1. Deeblock

    Deeblock

    Joined:
    Feb 14, 2018
    Posts:
    49
    I have a particle system simulating rain in my top down game. However, I cannot turn on collisions for the particles because colliders will block the particles from going further down the scene. In that case, how do I make "rain splashes" when the rain hits the floor? It's a 2D 3/4 top down game. Thanks
     
  2. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    Make them destroy after a certain amount of time. And add a function to spawn a "rain splash" particle when your ranidrop is destroyed.
     
  3. Deeblock

    Deeblock

    Joined:
    Feb 14, 2018
    Posts:
    49
    Hmm, I'm using the particle system built into Unity. Is there a function or method I can access when a particle reaches the end of its lifespan?
     
  4. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    You can just attach a script to it that checks for when its destroyed, and then Instantiate the splash particles
     
  5. Deeblock

    Deeblock

    Joined:
    Feb 14, 2018
    Posts:
    49
    Attach a script to the particle system? How can I check when an individual particle gets destroyed?
     
  6. Hyblademin

    Hyblademin

    Joined:
    Oct 14, 2013
    Posts:
    725
    Use the "Death" condition in the sub emitters module of the Particle System component. You can specify another Particle System made to look like a splash to start after the current particle is destroyed.
     
    mrCharli3 likes this.
  7. Deeblock

    Deeblock

    Joined:
    Feb 14, 2018
    Posts:
    49
    Oh woops. Thanks for clarifying! Didn't notice that sub module.