Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Possible to set parent for single particle?

Discussion in 'General Graphics' started by sd_trent, Mar 31, 2022.

  1. sd_trent

    sd_trent

    Joined:
    Jul 1, 2017
    Posts:
    37
    Hey guys,

    I have a "blood-splat" decal system where the blood-splats are single particles that are created when a particle from my "blood-drop" particle system collides with something. This works pretty well, but the only problem is when a blood-drop lands on an object that can move (i.e. a door) and creates a blood-splat there, it will remain at its original position even if the object moves.

    My plan was to simply make it so that when a blood-splat particle is created, it sets whatever it collided with as its parent. However, this doesn't seem to be possible, as the closest property I've found is Particle.position, After some testing, I don't think this will do the trick.

    Would anyone know how to get around this issue or how to properly implement it? Thanks!
     
  2. DrJBN

    DrJBN

    Joined:
    Sep 28, 2014
    Posts:
    49
    I'm thinking out loud, but you can parent a gameobject so could you parent a stuck_splatter_gameobject (e.g., a billboard quad) to the impact point and then copy the particle texture over to the quad's material texture and scale the object to the particle size?
     
    richardkettlewell likes this.
  3. sd_trent

    sd_trent

    Joined:
    Jul 1, 2017
    Posts:
    37
    Hmm ya I could give that a shot, I’ll see if I can make something like that work.