Weapon Projectile Trace is an alternative to the physics-based projectile (Weapon Projectile class). It is much simpler. There are no physics calculations for gravity, velocity, or friction. The result is immediate and support ricochets and surface penetration. You should use this class if you want a more arcade-style, instantaneous projectile system or for performance reasons.
HOW TO CREATE? #
From the content browser, use the context menu (right-click) to select Weapon Projectile Trace from the Projectile sub-category in Weapon Designer category.
HOW TO USE? #
- Select trace parameters.
- Select the damage type class.
- Use Weapon Ranged class or Weapon Designer Subsystem to spawn an instance.
RICOCHET #
The projectile can bounce off a surface. You can adjust the settings on the projectile and on the surface’s physical material to influence the projectile’s trajectory or control the conditions under which this event occurs. You don’t need a complex setup; simply add a “Weapon Designer Physical Material” to the world’s actors.
CROSSING #
The projectile can penetrate thin surfaces or surfaces with low resistance. You can adjust the settings for the projectile and the surface’s physical material to influence the projectile’s trajectory or control the conditions under which this event occurs. You don’t need a complex setup; simply add a physical material of the “Weapon Designer Physical Material” type to the world’s actors.
TRACER #
The Weapon Projectile Trace class includes a fairly simple tracer system that allows you to see a projectile’s trajectory. It works very well but does not support trajectory changes (ricochets, crossings, etc.). The Weapon Projectile Trace class modifies the values of two variables:
- User.Trigger: This is a boolean that indicates when the effect should be activated.
- User.ImpactPositions: This is a vector array that allows you to define the positions of the impact points.
As for the Niagara system, you can study the NS_ProjectileTrace asset in the example included with the plugin
POOLING SYSTEM #
If this projectile is created using the Weapon subsystem, it automatically uses the pooling system. This system helps optimize in-game performance and memory usage. More info about Pooling System here.
EVENT #
- On Tracing Hit: Called when the projectile hits something along its path.
- On Tracing Hits: Called when the projectile hits something along its path. Returns all objects hit. Is called only when the bMulti parameter is enabled.
- On Tracing Hit Nothing: Called if the projectile did not hit anything along its path.
