How do you set a Beam's length?

How to Set Particle Parameters In UE4 C++


**In Cascade **

Click on "Distribution Float Constant" (pic above as reference)

Select "**Distribution Float Particle Parameter**"

You can do this with most parameters in Cascade to then set them via code!


Give your parameter a name and default value (the constant), all within Cascade itself.

In C++

Now, in C++, after spawning your UParticleSystemComponent* via UGameplayStatics::Spawn Emitter, or some other method,

you can do this

YourPSC->SetFloatParameter(“YourChosenName”, NewValue);

Note you do this to the instance of the UParticleSystem*, which is of type UParticleSystemComponent*


**Further Info**

See ParticleSystemComponent.h!



Enjoy!

:)

Rama
1 Like