[VFX Graph] - Particles disappear after setting world position

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?

 VFXEventAttribute _attrib = vfxPrefab.CreateVFXEventAttribute();
_attrib.SetVector3("position", position);
_attrib.SetFloat("lifetime", duration);
_attrib.SetVector3("color", new Vector3(color.r, color.g, color.b));
vfxPrefab.SendEvent("OnManualSpawn", _attrib);

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.

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

4 Likes