Search Unity

get attribute: position node returns the running particle position?

Discussion in 'Visual Effect Graph' started by pym4742, Jun 14, 2022.

  1. pym4742

    pym4742

    Joined:
    May 14, 2020
    Posts:
    12
    Hi I have a question of basic level.

    If i use that way, then Do I get the position of a moving particle while it is currently running? Or do I get the position saved in the Initialize Particle?

    And I also want to know what is difference between "Current" and "Source" in get attribute node.

    upload_2022-6-14_18-48-36.png

    I've always been curious about this part




    I am making a node that calculates the distance between the initialized position (target Position) and the moved position (position), and stops the movement when the distance exceeds a certain amount. I asked a question because I thought it was necessary to understand the get attribute to make this.

    upload_2022-6-14_18-58-5.png
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,312
    Your question is a bit unclear - what does it mean "saved in the Initialize Particle" or "running particle"?
    There is block of data per system, imagine class Particle with some properties and there is huge list of them.
    When you use Get attribute XYZ (current) then you get property of currently updated particle. You can read about this here: https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@12.1/manual/Attributes.html

    Long story short get current attribute is used to access current particle data, while source is used to retrive previous system or initialization data like particleSpawnCount.