👾
Multiplayer Turret Documentation
  • 💬Welcome!
  • Tutorial
    • ‼️Getting Started
    • ⚒️Creating Your Own Turrets
      • Method 1 - Child Blueprints
      • Method 2 - Data Table Entry
  • Fundamentals
    • ↕️Configuration
      • Audio
      • Targets Config
      • Targeting Config
      • Rotation
      • Idle Rotation
      • Barrel Rotation
Powered by GitBook
On this page
  • Step 1 - Right Click BP_Turret
  • Step 2 - Configuring The Turret
  • Sub Step 1 - Change The Name To Match The Blueprint Name
  • Sub Step 2 - Setup Meshes
  • Select the meshes and rotate them 180 degrees on the Yaw Axis
  • Now we can adjust the pivot locations
  • Sub Step 3 - Collision Mesh
  • Now let's add it to our turret
  • Your turret should now be ready to be placed in your map
  1. Tutorial
  2. Creating Your Own Turrets

Method 1 - Child Blueprints

Here you will find out how to create child blueprints

PreviousCreating Your Own TurretsNextMethod 2 - Data Table Entry

Last updated 1 year ago

Step 1 - Right Click BP_Turret

Right clicking BP_Turret reveals a drop down menu which contains "Create Child Blueprint Class". Click this button to create a child blueprint and name it as you wish, you can always check the parent of each blueprint by hovering over them in case of if you forget what parent a blueprint belongs to.

For this tutorial I will create a new Child Blueprint Class of BP_Turret for demonstration purposes, I will walk you through the steps to get it set up and running.

Step 2 - Configuring The Turret

Inside your newly created child blueprint you will find the "Data" tab in the Class Defaults window.

Below you can see the Data struct on the right hand side of your window which contains all the configurable variables.

Note that you can still use a data table entry for child blueprints, ex. for quick testing The bottom four variables can be used to enable this.

Sub Step 1 - Change The Name To Match The Blueprint Name

This helps keeping it organized in-editor, the entire Data struct can be copied to another turret, useful for creating templates. Below I have named mine Minigun_04. The text in the viewport will update to match the name.

Sub Step 2 - Setup Meshes

Let's start by adding a Base Mesh, this is the part that is static and doesn't rotate. Next we'll add the Yaw Mesh, this part rotates on the Yaw axis (Left and Right). Then we'll add the Pitch Mesh, this part rotates on the Pitch axis (Up and Down). Lastly we'll add the Roll Mesh, this part rotates on the Roll axis (optional since this will rotate independently if RotateBarrel is enabled, ex. Minigun) Image below is the result of what we just did. Notice how the Yaw/Pitch/Roll Mesh is facing backwards, this is due to the way these meshes are exported from the modeling software, this serves as a good example of how to adjust it in-editor rather than re-exporting it from modeling software.

Select the meshes and rotate them 180 degrees on the Yaw Axis

Now we can adjust the pivot locations

We'll set Pivot_Yaw to

We'll set Pivot_Pitch to

Since the minigun doesn't quite fit, we'll set Mesh_Yaw's scale to

Lastly, we'll need to set Barrel_End's location, this one is most important, make sure nothing blocks this, the Arrow shows where the projectile spawns at and direction it is shot at.

When setup using the included meshes, you should end up with something like this

Meshes can be independently adjusted, if a mesh doesn't quite fit the way you want it to, you can edit it in the view-port. This saves having to go back to your modeling software to adjust the Mesh Origin.

Sub Step 3 - Collision Mesh

Make sure the collision mesh you use has correct simple collisions, this asset has a cone and sphere collision mesh included with preview material applied If the collision mesh is not setup properly, this includes collision channels on both the turret and your targets the turret won't be able to detect them inside.

Now let's add it to our turret

Your turret should now be ready to be placed in your map

This concludes the Blueprint Method of setting up a Turret. Visit the Configuration page to continue setting up the turret's behavior.

⚒️
Create Child Blueprint Class
Feel free to adjust anything until you get the desired result
Cone Collision Mesh
Out of the box Config, tweak it to your desire