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

Question Multiple Spawn Over Distance

Discussion in 'Visual Effect Graph' started by Blackfire-Studio, Sep 11, 2023.

  1. Blackfire-Studio

    Blackfire-Studio

    Joined:
    Dec 17, 2013
    Posts:
    178
    Hi there,

    I am using the Spawn Over Distance block to spawn particle over distance (obviously...).
    But i would like to know if there's a way to spawn several particles at the same position.

    By default every 0.5 meter, I spawn one particle but how would I spawn 2 or 5 particles every 0.5 meter ?

    I tried to change SpawnOverDistance : VFXSpawnerCallbacks but the way particles are spawned is a bit obscure. Seems that changing state.spawnCount and/or state.vfxEventAttribute might trigger a spawn.

    How would you approach such multiple spawn behavior ?
    Thank a lot !
     
  2. Blackfire-Studio

    Blackfire-Studio

    Joined:
    Dec 17, 2013
    Posts:
    178
    Thanks to Cyan on the Unity Discord, it's as simple as this. upload_2023-9-11_15-10-37.png
     
  3. OrsonFavrel

    OrsonFavrel

    Unity Technologies

    Joined:
    Jul 25, 2022
    Posts:
    128
    Was starting to answer to you. Glad to know that you find an answer.
    It's been a long time that I didn't take a look at the Discord Server. Will try to pass by during the week.
    Great day
     
    Blackfire-Studio likes this.
  4. Blackfire-Studio

    Blackfire-Studio

    Joined:
    Dec 17, 2013
    Posts:
    178
    Thanks @OrsonFavrel !