Niagara System – Make Particles Follow Mouse (Ball Pit Simulation)

Hi, sorry for my bad English. I’m very new to UE5 and I’m making a ball pit simulation using niagara system (with PBD) and trying to make the particles follow the mouse. not click or hit anything, just follow the mouse cursor when i move it around the screen. like attract to it.

I tried using deproject screen to world, so I get mouse position, make vector2d, then deproject. then i take world direction * 1000 and add to world origin to get a location in the world. then I send that location into niagara with a “Set Niagara Variable Vector3” and the variable is called User.MousePosition.

in the niagara system I have a user vector parameter called MousePosition and i use it in a Set Position module in particle spawn (now it’s 0,0,0). but when i move mouse nothing happens.

here is the blueprint i have right now and how my scene looks like:


is something wrong with my nodes? For this I don’t want to do hit result or trace, just follow mouse without clicking or touching anything. would love to hear all your thoughts.

thanks!

first thing to check is where the set happens: a component reference pointing at the niagara actor class can be null, so the value never lands, and the name on the set node has to match the user parameter exactly (no User. prefix on the node side, its implied).

second is where you consume it. Particle Spawn runs once at birth, so with the param read there the particles just stay at their spawn pos. put the position module in Particle Update instead and read the user param every tick, then the crowd follows your cursor. deproject screen to world is the right way to get that point btw.

pushing that vector in per tick gets clunky with the generic nodes, and Expose Niagara Variables C++ & Blueprints, a Niagara variable plugin for Unreal Engine 5, gives you direct get/set nodes for system variables so the cursor updates flow in without the name-matching guesswork: Expose Niagara Variables to Blueprint & C++ — Set Niagara Parameters at Runtime | Fab