Unreal 4.27 - Niagara - Adjusting position, rotation and scale depending on world orientation of parent

Hey guys, been lurking around for a while and decided I would finally post something as I think I could probably figure it out but I wanted to get a little outside perspective.

I am building a torch. Mostly everything is already made, but there is a particular facet of its behavior I want to work out.

Basically, fire goes up. When a torch changes its orientation, fire will always keep going up. However, the fire will change its shape quite a bit since its fuel source has changed its orientation. I have provided a simple image describing my setup as this is work related and I cannot show anything in engine cause I don’t want any NDA shenanigans. Anybody who is willing to share a thought or two on this would be appreciated.
This is in Unreal 4.27, and ideally this will all take place within the materials and the Niagara system. Blueprinting is allowed but discouraged for this problem.

2 Likes

My first instinct would be getting the dot product between the particle system’s Local Up and the World Up, that should give you a value of 1 when the torch is upright and a value of 0 when it’s completely flat. You can use that value to lerp between two different scales, positions, etc… both in the mesh and in the niagara module you’re using to set the particle’s initial position.

Edit: Also you might want to clamp it to 0-1 or get the absolute value since whenever the torch points downwards the dot product is going to get into the negatives

1 Like

Thanks Filo, this did help a lot. Turned out certain aspects were less complex then I initially thought, but this did end up being very useful regardless!

1 Like