Niagara - how to use SceneDepthTest?

I want to spawn particles only where they are colliding with the ground, so I wrote a Niagara Module Script that should do a trace against scene depth. However it’s not working – when I add it to a niagara system,particles are still spawning at the same location. Any ideas?