Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

[VFX Graph] - Particles disappear after setting world position

Discussion in 'Graphics Experimental Previews' started by turboturboturbo, Nov 23, 2019.

  1. turboturboturbo


    Dec 2, 2018

    My particles are unexpectedly disappearing/reappearing.
    (When I move the camera towards the particles, they disappear. When I move camera away from particles, they reappear.)

    This happened after setting the world position (it was working fine before).
    I have no clue what to do - any ideas?

    Code (CSharp):
    1.  VFXEventAttribute _attrib = vfxPrefab.CreateVFXEventAttribute();
    2. _attrib.SetVector3("position", position);
    3. _attrib.SetFloat("lifetime", duration);
    4. _attrib.SetVector3("color", new Vector3(color.r, color.g, color.b));
    5. vfxPrefab.SendEvent("OnManualSpawn", _attrib);

    Last edited: Nov 23, 2019
  2. cirocontinisio


    Jun 20, 2016
    Happened to me today. I can see from the screenshot that your System is set to Local, but the values in the Bounds block are expressed in World Space. So maybe your particles are being culled?

    This could be possible because you expect the particles to be somewhere in the scene, but their bounding box is at the origin so when you don't see it the particles are culled, and disappear.
  3. svjetlonosha141


    Jul 1, 2021
    Hey, I just had the same problem after a day of trying different things I finally realized what's the problem.
    You have to increase the bounds within the VFX (for example, for me it fixed the problem when I set the size to 20, instead of the inital 5x5x5) + make sure its local

    Attached Files: