In my project, I’m using a Data Table to assign specific effects to different Blueprint Actors. These effects are spawned when the Actor is destroyed. This system works well overall.
The Actors in the game world have different sizes. I want the visual effect to scale according to the size of the object so that it visually matches. To achieve this, I use the Get Component Bounds node and divide the result by a value that gives me an appropriate effect scale for each size.
However, here’s the problem: the number of particles also increases with the object’s size, and I can’t figure out why.
I’ve created a User Parameter in the Niagara Effect that sets the Spawn Count as an INT32. For smaller objects, this value is correctly applied, but the larger the object gets, the more the particle count increases.
As far as I know, the only value controlling the Spawn Count in my Niagara System is the User Parameter I set.
My suspicion is that the issue may be related to the Spawn System at Location node.
the clean way is a scale parameter rather than hardcoding counts per actor:
add a float user parameter to the effect, for example SizeScale, and multiply it into the spawn (spawn burst instantaneous count times the parameter, or spawn rate times it). the effect stays one asset.
on the destroyed actor: spawn system at location, immediately set variable float with SizeScale mapped from the actor size (get actor bounds, take the largest extent, map it into your 0.5 to 3 range or whatever fits your art), then activate. set it before activate so the first frame already matches the actor.
if the actors differ a lot in shape too, add a vector user parameter for uniform size and feed it the same bounds, then multiply it into sprite size and mesh scale modules so density and visual size scale together instead of just more particles at the same size.
the stock blueprint setter handles the basic user float fine, but the moment you want the vector variant or any type outside the exposed set you run out of nodes. the Expose Niagara Variables C++ & Blueprints plugin exposes 18 variable types across all 8 niagara namespaces with getters, blueprint and c++, so the whole size mapping can live in one c++ call if you prefer keeping the blueprint clean: Expose Niagara Variables C++ & Blueprints | Fab