Search Unity

Resolved Using the sequential circle position node - can I set certain segments of the circle to active?

Discussion in 'Visual Effect Graph' started by laurienash, Feb 26, 2021.

  1. laurienash

    laurienash

    Joined:
    Mar 15, 2013
    Posts:
    61
    Hiya,

    I'm currently making a particle effect where the position is spawned using the sequential circle node.

    However I'd like to only spawn certain wedges of the circle, as shown in this pic:
    (So rather than spawning at regular intervals for the full circle - I'd like it spawn for the first 60 degrees, then not spawn for 60 degrees etc)

    Capture2.PNG

    Is it possible to do this with the sequential circle position node, or should I look into a different method?

    I'm not having much luck getting it look right with a point cache and setting the position from a map - so unsure of what to try next?

    Thanks
     
  2. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hi @laurienash ,

    The sequential circle block itself does not have that functionality, however you can math out the segments you want and discard the ones you don't using the Set Alive block:

    Here we are starting with 120 particles. We are dividing their ID by 10 and then using floor to round the numbers down, giving us for each 10 particles an incremental number 0, 1, 2, etc. Then using Modulo with 2 to check for even/odd groups of particles and can then discard half of them in Set Alive.

    Hope this helps!
     

    Attached Files:

  3. laurienash

    laurienash

    Joined:
    Mar 15, 2013
    Posts:
    61
    Oh that's amazing, wish I was that good at maths. Thanks so much!
     
    VladVNeykov likes this.