Getting Started

Video Tutorial

This video follows the same tutorial as over the next few pages so feel free to follow along however you wish. All assets used in the video tutorial can be downloaded from Example Projects.

Installing The Plugin

Gunsmith has been tested against the built-in Third Person Shooter and First Person shooter projects but should work in any project that you have the relevant meshes and animations for. For the sake of this tutorial we will be using the ThirdPerson template.

The first thing you will need to do after creating your project is to download the plugin from the Fab Marketplace or via Git (Not Currently Available). Gunsmith only supports Unreal versions 5.6 and onwards so make sure that your engine version matches this.

Note

Unreal 5.5 can be targeted if you are able to edit your engine source code. Add the following to NetworkPredictionWorldManager.h:

public:
    const FFixedTickState& GetFixedTickState() const { return FixedTickState; }
    const FVariableTickState& GetVariableTickState() const { return VariableTickState; }

If downloading via Fab, add the plugin to your project via the Epic Games Launcher. Otherwise, copy the plugin to your Project or Engine Plugin folder and regenerate your project files.

Finally, enable the Gunsmith plugin from your Unreal Editor via the Edit->Plugins menu. Alternatively you can manually edit the projects .uproject file.

YourProject.uproject
"Plugins":
[
  {
    "Name": "Gunsmith",
    "Enabled": true
  }
]

If you intend to use Gunsmith via C++ you’ll also need to add “Gunsmith” to your PrivateDependencyModuleNames in your projects build.cs file.

Setting Up Collision Layers

Now you will need to add a trace channel and preset for the rollback collision to use. As primitives will be moving around at a different rate to the simulation during rollback (sometimes many moves per frame), we need to ensure that the hit validation trace is not going to hit any non-validation primitives.

In the editor, go to Edit->Project Settings->Engine->Collision and create a new Trace Channel. Name this ProjectileTrace and set it to Ignore by default. This is the trace channel that we will set all projectiles to use by default.

Next up is to make a collision preset in the section below. Create a new preset and call it ProjectileTarget. This is the preset that we will give to the rollback primitives. Set all trace types to Ignore except for the new ProjectileTrace layer which can be set to Block. This should also be QueryOnly and the ObjectType can be set to Pawn for now.

Once the preset is set up, you will need to go through all existing presets that you would like projectiles to collide with and set the ProjectileTrace trace type to Block. Both BlockAll and BlockAllDynamic should block projectiles as most of your environmental assets should use these but you may have other presets in your own project that also need to be set.

Once these have been set up you can set up the Default Projectile Collision Channel in the Project Settings->Gunsmith Settings. This should be set to your new ProjectileTrace channel but can be overridden per projectile later if needed.

Network Prediction Plugin Settings

At the time of writing this documentation, Gunsmith has only been developed to use the Network Prediction Plugins Fixed ticking policy. This setting can be found in Edit->Project Settings->Project->Network Prediction. The Mover component also only works with the Interpolated Simulated Proxy Network LOD setting but work is being done to improve Forward Predict mode. Feel free to play with other settings, in particular Enable Fixed Tick Smoothing and the Fixed Tick Frame Rate.