Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[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


    Unity Technologies

    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.