Impact Effect Module is the base class for adding an action upon impact on a surface. You must add these modules to the Impact Context asset in order for the action to occur.
The plugin integrates several basic modules which you can use as is or as a basis for your own module.
Class Function #
- Spawn Effect : This function is called by projectile when an impact occur. This is where you will define the action you want to perform.
Class Settings #
- Condition Class : You can impose a condition that must be required for the action to occur. See the documentation on this subject.
To create a new class based on Impact Effect Module, you can do it quickly using the context menu. Choose Impact Designer > Event > Impact Effect Module.
Pre-integrated Module #
Spawn Niagara Effect (Niagara Spawner) #
This module allows you to add a particle effect during an impact. You choose which System Niagara you want to use. I recommend using “Once” behavior.
- Impact VFX : Niagara system that is spawned on impact point. For performance optimization, don’t use Niagara system with big lifetime.
- Velocity Based Scale : If enabled, niagara system scale is based on impact velocity.
- Velocity Range : Minimum and maximum velocity of the projectile to calculate the scale
- Scale Range : Minimum and maximum scale of niagara component.
- Pooling Method : You can choose whether the component will be recycled or not. Optimizes performance but interacting with this component while it is placed in the pool may cause a crash.
- Forward Axis : This module uses normal impact to orient niagara actor. So, Niagara actor is oriented to forward vector of impact normal. You can select another forward axis like Z to orient niagara actor.
- Spawn Offset : Adds an offset to the position of the niagara component. Can be useful if you use collision inside niagara particle.
- Generate Particle Event : Impact Designer includes an interesting feature that allows you to trigger events when a particle hits something. You can decide whether or not to enable this feature.
- Niagara Particle Event Spawner Class : Supports data transfer between a Niagara system and the C++ or blueprint class. Override this class only for specific behavior.
- Callback Handle Parameter Name : Variable name used in niagara system for object. User parameter name to use in Niagara System to export data (see ExportParticleDataToBlueprint Module).
- Should be a UObject.
- Export data is absolutely necessary if you want effect or damage when particle hit surface.
- Kill Condition : How to destroy Niagara Particle Event Spawner Actor.
- Lifetime : [Only used in Time based kill condition] Lifetime of Niagara Particle Event Spawner Actor.
- Max Particle Action Call : [Only used in Amount Based kill condition] How many particle generate hit before destroy.
- Disable System Before Destroy : [Only used in Amount Based kill condition] If enabled, disable Niagara Component before destroying.
- Delay Before Destroy : [Only used in Amount Based kill condition] When kill condition reached, let a delay before destroying Niagara Particle Event Spawner Actor. 0 disable this feature.
- Impact Particle Event : Class that contains the logic of the event that is triggered when a particle collides with something in the world.
Spawn Mesh (Mesh Spawner) #
This module allows you to add a mesh at the point of impact. Should be used for display only. No collision or interaction with the mesh is possible.
- Mesh : The static mesh you want to use.
- Scale : The scale applied to the mesh.
- Life Duration : The lifespan of the mesh.
- Random Rotation : If enabled, applies random rotation. The mesh remains oriented relative to the impact normal point.
Spawn Sound (Sound Spawner) #
This module allows you to add sound.
- Sound : The sound (Sound CUE) you want to use.
- Volume : Volume of sound.
- Pitch : Pitch of sound.
- Start Time : Leave it at 0 if you don’t need this feature.
- Override Sound Settings : If enabled, you can set parameters different from that of the Sound CUE class
- Attenuation : Attenuation you want to use.
- Concurrency : Concurrency you want to use.
- Affected by Time Dilation : Whether or not time dilation affects sound.
Spawn Decal (Decal Spawner) #
This module allows you to add a decal at the point of impact.
- Decal : the decal material you want to use. Material Domain should be Deferred Decal.
- Size : Size of decal. This size can be modified slightly based on impact velocity.
- Size Randomness : If enabled, applies a random size to the decal according to the values above.
- Min Random Multiplier : Min random size.
- Max Random Multiplier : Max random size.
- Use Sub UV : If enabled, uses sub uv. The texture in your material must be compatible (flipbook type)
- Sub UV Size : Grid size.
- Attach to Component : Whether or not the decal should be attached to the object touched.
- Orientation Mode : You can choose between three orientation modes.
- Random Rotation : The decal is oriented according to the normal of the point of impact but you can apply a rotation around the axis.
- Velocity Based : The decal is oriented according to the velocity of the projectile. Very useful for ricochets for example.
- Custom : You choose the orientation of the decal.
- Custom Direction : [Only used in Custom Orientation Mode] Vector used for orientation.
Spawn Velocity Projected Decal (Velocity Projected Decal Spawner) #
Inherited from Decal Spawner
This module allows you to calculate the position and orientation of the decal according to the velocity of the projectile. It use line trace. Very useful for blood splash or other type effects when the projectile passes through an object.
- Line Trace Max Distance : Maximum distance from projectile exit point.
- Line Trace Channel : The profile used to check if there is a collision.