Cannot rotate a Niagara system to match the normal result of a line trace

I’ve created a particle system in Niagara and I want it to align to a surface defined by a line trace.

This is a view of the code I’m using:

The position resulting from the line trace is being correctly assigned to the system, but I have two major issues with the rotation:

Issue 1: With the pictured code, the system is always rotated perpendicular to the hit surface instead of parallel. It seems like it would be a simple thing to rotate it, but I’ve tried everything I could think of to do so and could not get a correct result. I’ve tried doing a cross product and I tried something I saw about swapping two axis and negating one of them to get a perpendicular vector, but nothing has worked.

Issue 2: When the system is rotated, the particles (meshes) do not maintain their original rotation within the system. At one angle it will look right but then at others the particles are no longer rotated correctly. It’s as if one axis of rotation is not being inherited.

I am pulling my hair out with this so I would be grateful for any help.

Here’s a detailed look at the particle system:












I don’t have time just now, but your initial rotation is set to world, but your added velocity is local. Is that an issue? I might take a closer look later when I have time though I’m probably not the best person for this.

Hi, thanks for taking a look. I get different results from changing these settings, all of them wrong.

Testing this separate from the line trace/normal issue…

If I set Mesh Orientation Mode to System and the initial rotation to local and the added velocity to local, and then set Facing Mode to Default instead of Velocity in the Mesh Renderer, I get consistent and expected results. But I need to have Facing Mode set to Velocity so the mesh particles will face the direction of travel instead of all facing the same direction. With this enabled, no combination of these settings will make the meshes rotate correctly to match the rotation of the system.

If I do:
Mesh Orientation Mode: None
Initial Rotation: Local
Add Velocity: Local
Facing Mode: Velocity
Then everything looks correct except that the meshes seem to ignore rolling around the X or Y axis. If I roll the system, the individual meshes always remain aligned to the horizon.

If I do the same except with Mesh Orientation Mode set to System, the meshes roll with the system, but if I rotate the system around the Z axis the meshes go from facing the correct direction along their line of travel to facing the opposite direction to their line of travel.

I am beyond lost with this. Every combination of things just moves the problem to a different axis or whatever. It’s infuriating. I’ve tried every combination many times.

Is it possible setting the facing mode to velocity just doesn’t work correctly for this application? This feature aligns the forward vector of the mesh to the velocity vector, but that leaves the roll ambiguous. Did they miss something when implementing this?

I have found a partial solution that is “good enough” for now.


The issue with matching the rotation of the system to the line trace normal I addressed by resetting the rotation of my “cone” shape velocity mode so that it’s perpendicular to the horizon. This cancels out the perpendicular nature of the normal vector from the line trace. I’m not sure why I couldn’t manage to rotate that result before, but doing this change may also have helped with the below.


For the mesh particles rotation, first I edited the mesh itself by rotating it to ensure that its forward was facing the X axis and baked that in. Before I was compensating for this by setting an initial rotation of the particle. I reset all such rotations as they seemed to contribute to all sorts of weirdness once the system started getting rotated.

Then I disabled Facing Mode > Velocity in the Mesh renderer, and used Update Mesh Orientation in the Particle Update stack instead. By setting it to Orient to Vector and setting the Facing Direction to Particles Velocity, this behaves similarly to Facing Mode > Velocity in the Mesh Renderer, but it has “Stabilization Modes.”

Critical step: clicking the downward arrow at the bottom in the details panel reveals the “advanced” options and in here you can change the coordinate space of the Stabilization mode to Local space. I set the stabilization setting to Facing/Up but with the Up Direction changed to 1,0,0 (since the system is perpendicular).

Unfortunately this is only a partial solution because since it’s in the Update stack, that means that existing particles will be affected and changed when the system rotates, causing them to suddenly change rotation too.


They should add similar stabilizing options to the Facing Mode in the Mesh Renderer as well to make this work properly. Add probably should not hide the options to change the coordinate space for the Stabilization Mode.

If it’s in the update, there’s an option in the blue system properties called Warmup time. This will allow the system to appear as if it started after X seconds. It’s like a fast forward option. So you can apply several iterations of updates and it will appear that way right at the start.

Not sure if I explained that correctly. But try playing with the Warmup Time if you’re rotating the system right away. You can also spawn the system with the rotation in the starting transform.

If you’re rotating afterwards, what I mentioned here won’t work. But thought I’d mention the Warmup Time option in case it’s useful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.