Mesh Orientation, forward and top vector control on Spline path

You can sample both Forward Vector (Direction) and Up Vector in your Niagara Module and store the values as Particle Attributes so that you can access them in other Niagara Modules

Then you can use the Update Mesh Orientation build-in module to orient your mesh based on the sampled vectors, using the Orient To Vecotr(s) Method

The problem then is to make sure your spline-up vector is correct, in my example I’ve just drawn a spline around a sphere. As expected I get this result:


Some meshes on one part of the spline are aligned nicely but other parts aren’t.

If you want the particles’ up vector always facing away from the planet you can calculate it in Niagara if you move the Niagara System in your level to the center of the planet and then subtract that position from the particle’s position.

Add the particle’s position and the position of the emitter (Engine Emitter SimulationPosition) in your “Map Get” node, covert them to vectors, subtract one to the other and plug the result in a “Direction and Lenght Safe” node (to normalize the vector) and that’s going to be your new UpVector.
Do a cross product to get the right vector if you need that one as well

Result

6 Likes