Search Unity

Question VFX world space work different when it has a parent or not.

Discussion in 'Visual Effect Graph' started by shibi2017, Dec 27, 2021.

  1. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
    VFX wolrd space work different when it has a parent or not.
    What I have:
    · a VFX using world space
    upload_2021-12-27_18-32-58.png
    · a explosion velocity from target position
    upload_2021-12-27_18-33-23.png

    · vfx has a parent
    upload_2021-12-27_18-34-38.png
    · the parent is bind to the target position
    upload_2021-12-27_18-34-15.png

    When parent in position (0,0,0), it works fine: upload_2021-12-27_18-35-22.png
    but when I move the parent, the explosion speed center seems did not move(or move slow than the vfx it does), so the particles tends to move towards a center direction but not like a "explode" one.
     
  2. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
    when I move the parent:
    upload_2021-12-27_18-37-34.png
     
  3. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
    all the particle have addition speed towards moving direction.
     
  4. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
    And if I let vfx become a single obj without parent, and move vfx to 0,0,0
    It works fine:
    upload_2021-12-27_18-39-35.png

    upload_2021-12-27_18-39-50.png

    upload_2021-12-27_18-39-55.png
     

    Attached Files:

  5. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    Hi. The change space block in your second screen seems incorrect. If your system is in world space, stored particle positions are already in world space. Here it seems you're performing a local to world transformation on some data already in world space, resulting in incorrect output.
     
  6. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
    thank you. I'll check it.