Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. We are looking for feedback on the naming of a new user research platform that we are working on.
    Dismiss Notice
  3. 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

[VFX Graph] - Particles disappear after setting world position

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

  1. turboturboturbo

    turboturboturbo

    Joined:
    Dec 2, 2018
    Posts:
    20
    Hi,

    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

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    444
    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.
     
unityunity