ImpactFX is built on a modern, decoupled, data-driven architecture. Instead of hardcoding massive Switch on Physical Material nodes inside your weapon or character blueprints—which is highly inefficient and difficult to maintain—ImpactFX handles everything through a single, modular Actor Component (BPC_ImpactFX) and Primary Data Assets.
This approach ensures that your core game logic remains clean, and adding new surfaces or tweaking visuals requires zero changes to your actual code or Blueprint graphs.
The entire framework is driven by the BPC_ImpactFX component. To use the system, this component simply needs to be added to the Actor responsible for handling weapon traces or projectile hits (usually your Character, Weapon, or Projectile class).
When a shot hits a surface, your code simply calls the HandleImpact function inside this component, passing the Hit Result (Out Hit). The component takes care of the rest.
When a bullet strikes a surface, BPC_ImpactFX executes a highly optimized sequence of events. Here is exactly what happens under the hood:
The game registers a hit (via Line Trace / Raycast or physical Projectile collision) and generates a standard Unreal Engine Hit Result.
The HandleImpact function extracts the Physical Material from the Hit Result.
Instead of executing a long switch statement, the system reads the PDA_ImpactFX_Template (Data Asset). It uses the extracted Physical Material as a key to search a TMap dictionary. If a match is found, it retrieves the S_ImpactFX_Data struct containing all the specific VFX, decals, and parameters for that exact surface.