How to Alter Niagara Particle Attributes on Collision in Unreal Engine

How to change particle attributes upon collision in Unreal Engine's Niagara editor.

How to Alter Niagara Particle Attributes on Collision in Unreal Engine

Did you know that Unreal Engine's Niagara editor allows you to transform your particle attributes upon collision?

In today's Quick Tip, we break down how you can use this feature set to alter your particles' color and velocity!

How to Alter Niagara Particle Attributes on Collision in Unreal Engine

  1. In particle update, add a "collision" module
  2. In collision module, set Particle Radius Scale to -1 and Restitution to -1
  3. Set Enable Rest State to "deactivate"
  4. Set CPU Trace Vector Length Multiplier to 1.0
  5. In particle update, add a "Do Once" module
  6. Set 'Trigger Condition' to "[PARTICLES] HasCollided"
  7. Create a New Scratch Pad Module and rename it "ChangeAttributesAtCollision"
  8. Add these attributes: [PARTICLES] Velocity (vector3) + [INPUT] Vector3 (rename VelMult) + [INPUT] Linear Color (rename NewColor) + [PARTICLES] Color + [PARTICLES] [DO ONCE] Execute
  9. Wire up these nodes: mutiply Velocity by VelMult + create 'Select' node and add a vector3 and a linear color to output + wire Execute to Selector in Select node + Multiplied Velocity into True side vector3 of Select node + NewColor into True Side linear color of Select node + '[PARTICLES] Velocity' into False side vector3 of Select node + '[PARTICLES] Color' into False side linear color of Select node
  10. Add these attributes to Map Set: [PARTICLES] Velocity + [PARTICLES] Color
  11. Wire respective outputs of Select node into inputs of Map Set node and Apply
  12. Set Velocity Multiplier default values to 1, 1, 1
  13. Set attributes to change as desired on collision

And there you go! Your particle attributes now change on collision!

Want to stay in touch with our studio as we craft world-class real-time VFX? Follow Beyond-FX on Twitter, Instagram, Facebook, YouTube, Twitch, & TikTok!