Move to Nearest Distance Field Surface GPU on Spawn Issues

I’m using the Move to Nearest Distance Field Surface GPU module in the spawn script of my effect, but I’m getting inconsistent results. What I’m trying to do is spawn a small number of particles, have them snap to the nearest surface on spawn, and then live forever. Sometimes this works fine, but many times the particles just don’t snap to anything, as if they don’t know about the surrounding geometry. If I reset the system, that usually fixes the problem, but I need these particles to reliably snap to surrounding surfaces, they can’t be floating in the air.

There seems to be 2 problems I’m running into:

  1. The module doesn’t seem to work once the nearest surface is >450 cm away.
  2. Particles sometimes don’t snap properly when a level is loaded from the content browser, or on editor startup.

Initially I was just killing any particle that didn’t snap to a position at the end of the spawn script, to remove any floating particles. This worked ok but in cases where the level loads and none of the particles snap, it would kill all the particles. Right now I’m trying to do a comprehensive check in the update script to snap any particle that is still floating, but this is starting to feel clunky, and I’m wondering if someone has run into this issue who could give me some advice.

The >450 cm distance issue is not a big deal for me. I’m ok with just killing those particles. It’s determining which are within the range and just improperly loaded which is the tricky part. I could just put a Move to Nearest Distance Field Surface GPU module in the update script but the particles jitter and it adds unnecessary cost. I need some way of determining when to turn it off, and only do this once. This is what I’m currently working on.

Ideally I would just avoid doing anything in the update script but it’s starting to seem unavoidable. Again, any help would be appreciated.