The choice is yours!
Use pre-integrated Impact Ranged Weapon class #
This class contains basic shooting functions. It will be enhanced in future updates. Once created, set its basic parameters and those of its component (Projectile Spawner). In this component, don’t forget to enter the projectile class you wish to use.
Use Impact Projectile Spawner component in your own weapon class #
Add the Impact Projectile Spawner component to your class, set the parameters and call the Start Fire and End Fire functions, the component takes care of the rest. The advantage of using this component is that it has a feature for limiting the number of projectile instantiations called Pooling System. When a projectile is no longer needed, it is stored in memory for later use. This avoids the need to constantly create new projectiles, which has a positive impact on performance and memory.
You take care of everything! #
Create a new projectile simply by calling the Spawn Actor function and selecting the projectile class you wish to use.