I’ll try to explain it as best as I can, I want to create one ribbon effect for sword swipes that is used on multiple different swords of various lengths and align perfectly to the length of the sword’s blade. I was thinking if there’s a way to select two sockets and systematically adjust the width of the ribbon for each sword. So like all swords have two sockets say FX_Socket_Tip and FX_Socket_Base, then the ribbon which is attached to the sword, will read if the source has those two sockets, if they do the width of the ribbon starts from _Tip and ends in _Base.
In System Update, you can use 2 Mesh Location modules to sample the 2 sockets position, then set a System float parameter “BladeWidth” to calculate and cache the distance between the 2 sampled positions. Also set a System vector parameter “BladeForward” to calculate and cache the normalized direction of (tip position - base position).
In Particle Spawn, set the Ribbon Width with the System.BladeWidth. Then “Direct set” Particles.Position with the sampled base position, plus world offset by (normalized) System.BladeForward * System.BladeWidth * 0.5; set Particles.RibbonFacing with System.BladeForward.
In Ribbon Renderer, change the ribbon facing mode to Custom Side Vector, so the ribbon renderer reads the Particles.RibbonFacing (the blade pointing/forward direction) sort of “bitangent/binormal vector” (if we treat the ribbon plane facing as its “normal”, and the blade traveling direction as its “tangent”).
Disclaimer: I don’t have a PC by my side right now so I can’t capture any screenshots, but that’s the idea to make a general purpose weapon trail in Niagara.
I understand the setup can feel incredibly boilerplate, considering there was a convenient trail tool back in UE4. Even I had to correct my own answer several times after the initial submission. However, setting this up yourself helps understand how vector works in a meaningful way.
