Mask Niagara distance field by slope

Hi, I’m a bit stuck with a certain effect I want to achieve.

I’m spawning some particles using the ‘Move to Nearest Distance Field Surface GPU’ module, however, I want to mask these particles by slope.
For a visual representation, in the video example, I want my particles to spawn on the floor, but not on the straigth walls, like the particles spawning on the cube side faces.
DistanceFieldNiagaraQuestion

Thanks in advance :slight_smile:

1 Like

So, using the out variable of “vectortonearestsurfacenormal”, and setting the axis you want to do a dot product with you can set up a “kill” parameter to limit the axis on what surface normal a particle will spawn. In my example I use colors to show which surface normal the particel is being aligned with.

Heres the setup in the particle system. I hope that this helps a bit

5 Likes

Yes!!! I believe that this method would be the best option for this case!

This is what I was looking for! Works perfectly! Thank you very much :slight_smile:

2 Likes