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. Dismiss Notice

GPUEvent Trigger Once at Birth

Discussion in 'Visual Effect Graph' started by andyox66, Mar 9, 2020.

  1. andyox66

    andyox66

    Joined:
    Aug 27, 2015
    Posts:
    15
    Is there a way to trigger a burst of particles once when a particle is born? Like the 'Trigger Event On Die' but when a particle is born?
     
  2. PaulDemeulenaere

    PaulDemeulenaere

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    134
    Hi !
    There isn't "Trigger On Born" embedded block, you could eventually test the age of the particle to output an event (alternatively, you can also store a custom boolean and toggle it within the first Update).
    _Solution_A.gif

    ... but the same effect would be more efficient and simpler using spawn chaining.
    _Solution_B.gif

    Are you in a situation where spawn context chaining doesn't fit ? Maybe your particle initialization relies on a texture or something not available in spawn context.

    We will consider this kind of "Trigger On Born" block in later release, thank for sharing this request.
     
    Last edited: Mar 10, 2020
    VladVNeykov likes this.
  3. PolarbombVFX

    PolarbombVFX

    Joined:
    Aug 22, 2023
    Posts:
    4
    I was looking for a similar function too.
    To mimic Shuriken when you have a particle system with a sub system that spawns a burst of particles at the parent system particle locations on birth, inheriting direction and velocity to create interesting direcitonal bursts of particles.

    I was able to replicate the behavior by simply setting the first particle system lifetime to 0. It creates the GPU on death event instantly and the initialized data can be inherited by the other system.

    If I would want a particle to travel with the same settings as the triggering particle (System (1)) I'd just add a new Initialize Particle from the same GPU event and inherit position and velocity without modifying it.

    upload_2023-8-22_10-17-31.png