How I can use Niagara Particle System in C++


How I can use Niagara Particle System in C++

I am converting the fly faster blueprint of our game into C++ and most of the logic of this power-up is very easy, but I was having a lot of issues trying to understand how to use the Niagara particle system in C++. Since the Niagara System is new there is not a lot of documentation in the Internet about this.

According to my first research to use the particle effects I had to create it in C++ and make it editable so it was going to appear inside the butterfly and I was going to be able to add the Niagara Particle system to work the way I wanted. I was able to add the Niagara Particle system that I wanted but when I tested it inside the game the particles were not showing up. To be honest, in my internet research some people said that is an Unreal Engine bug and other people said that the way I was thinking of implementing it was not going to be possible since the function name said “DebugOnly”.

Then I got the perfect idea to solve it. This idea was to get a reference to the Niagara Particle system so I don’t have to delete it or change it or add the Niagara particle system again inside the butterfly. And when I wanted the particles to be activated, I can do it with a very simple function as I did inside the blueprint just showing and hiding the Niagara Particles when I need them.

I did a lot of testing on this and for now, it’s working as expected.

Leave a comment

Log in with itch.io to leave a comment.