Niagara System - change spline via blueprint (User.Parameter)

Hello,
I’m currently trying out different methods of solving a problem (Objects following Splines).

The basic setup is:

  • one niagara system, with one emitter which has a niagara script as module (see below)
  • a niagara script which takes a spline as input + the normalized particle age to map the age to the spline
  • a blueprint which creates spline components that connect different actors in the level with splines.
    The blueprint also spawns a Niagara System for each spline component in my BP

I now want to set the input spline of the niagara script that I added as a module to my basicEmitter.
The Spline is made a User. Variable so I can access it in the editor and should be able to set it with Set “…”

But the only available Paramters to set don’t seem to fit (Actor, Bool, Color, Float, Vector).

I could, of course take Actor and put a reference to self in it, as I’m having multiple Splines this doesn’t seem like a viable option (and I’m also not sure if Niagara would take the spline component anyway)

Is there a way to set this User. data from a Blueprint? (Or any other way?)

Thanks!
Daniel

Hey Daniel

Did you found a way to set the spline parameter through BP? I’m also trying to do the same thing!

Flo

No unfortunately not. I’m at the moment, creating a Niagara System for each Spline.
As the niagara system seems to take use the spline from the same actor this kind of works but creates a load of, in my opinion, unnecessary systems.

Ok yeah I’m doing the same…

Could you post the niagara module script and setup that worked? I’ve tried module, user etc properties and i cant even get the system to pull from the spline component it’s parented to inside an actor.

I basically created a custom Niagara Module to implement the spline following.
The Spline input is set to User.Spline and I access this in my Blueprint with the spline in it.

Hope it helps.
Cheers

1 Like

I found a way to set it from C++/BP:
Create a user parameter that is an object parameter:
image

Make a scratch module where you sample the spline. Feed it with that spline user parameter:

Call SetVariableObject on the niagara component:

3 Likes

Could you provide the C++ class for us to use?

This method makes UE 5.3 crash :')

1 Like