Bullet Forge Documentation

Install

  • Use the Epic games launcher to install the plugin into your engine

  • (Optional) Copy the BulletForge Plugin folder into your project ‘plugins’ folder

Plugin Developer Settings

Access the developer settings by going into your project settings and scrolling down to the plugins section. Click on Bullet Forge.

  • Max Traces Per Tick - Defines the max traces the system will attempt per tick

  • Air Density - Defines the air density for trace calculations

  • Default Gravity - Defines the gravity for trace calculations

  • Base Penetration Modifier - this value is used to scale the penetration power of bullets. It allows for dynamic adjustment of penetration behavior based on gameplay needs. A value of 1.0 means no modification, while values greater than 1.0 will increase penetration power.

  • Base Ricochet Angle - Bullet Forge will attempt to ricochet if the incidence angle exceeds this value.

  • Ricochet Angle Factor Modifier - This value multiplies the AngleFactor used in ricochet calculations. It allows for dynamic adjustment of ricochet behavior based on gameplay needs. A value of 1.0 means no modification, while values greater than 1.0 will increase the chance of ricochets at shallower angles.

  • Default Material Density - This value is used when no specific material density is provided by the hit actor.

  • Material Hardness Divisor - Used to normalize material hardness values for penetration calculations. Default value is set to 7850 kg/m³, which is the density of steel. Adjust this value based on the materials used in your game for more accurate penetration effects. Higher values will make penetration more difficult, while lower values will make it easier.

  • Material Hardness Modifier - Value will be added to the calculated material hardness. This allows for fine-tuning of penetration effects based on gameplay needs. A positive value will increase the effective hardness, making penetration more difficult, while a negative value will decrease it.

  • Default Material Thickness - This value is used when no specific material thickness is provided by the hit actor. It serves as a fallback value for penetration calculations.

  • Material Thickness Modifier - This value is used to adjust the thickness of materials based on gameplay needs. It can be used to make materials thicker or thinner without changing the actual material properties. This will be added to the calculated material thickness during penetration calculations.

—————————————————————————————————————————————————————

Setup a bullet asset

  • Create a data asset with the class BallisticSettings

  • Fill out the data as needed

Setup the weapon component

  • Create a blueprint class from the type: BulletForgeWeaponComponent

  • Open the blueprint and override the function: SpawnImpactEffects

  • Implement any logic needed for creating impact effects on surfaces

    • One way to do this is to assign physical materials to your in game objects and utilize gameplay tags to determine what sound and/or effect to play

Setup your weapon class

  • Add the new actor component we created above to your weapon actor blueprint

  • Implement the SpawnWeaponEffects event and add your logic for playing weapon sounds and muzzle effects

  • Implement the SpawnShellEffects event and add your logic for playing any ejection shell effects needed for the weapon

  • Add a variable of type BallisticSettings and assign it to the bullet we created above

  • Locate your shooting or firing logic and add drag the component into the graph

  • Drag off the component and find the function FireBullet

  • Input the required values

    • Muzzle Transform - Get the location of the muzzle or where the weapon is aiming

    • Settings - Input the BallisticSettings variable we made above

    • Owning Actor - Set this to the owner of the weapon, typically a pawn. Easiest way to do that is use the GetOwner Unreal Engine function

    • Ignored Actors - Add any actors (such as weapon attachments) to an array and plug the array in

    • Show Debug - If you want debug traces to show on the client

    • Debug Duration - How long those debug traces stay on screen

  • The FireBullet function will automatically call the server function and client events when triggered from the client

Setup reactive actors

  • Use and actor that will need to react to bullet hits, penetrations, ricochets or flybys

    • Typically this can be the character pawn or some kind of armor actor

  • Add the component BulletForgeReactive to the blueprint

  • Implement the OnPenetrationEvent, OnRicochetEvent, OnHitEvent, or OnFlyByEvent as needed

  • Go to class settings and implement the BulletForgeInterface

  • Implement the GetReactiveComponent interface function and drag the BulletForgeReactive component into the return value

  • (optionally) Implement other interface functions to customize the behavior of traces