Getting Started

Welcome to the Procedural First Person Toolkit. This guide will walk you through the initial setup to integrate the plugin with the Unreal Engine First Person Shooter Template (Arena Shooter variant). By the end of this part, you will have a functional procedural system featuring Sway, Offsets, and a procedural Aim Offset.

It is important to note that this knowledge can be applied to any other projects you may need on the future.

Issues or Questions

If you notice something wrong or have any problem while following these steps, feel free to join our discord and request support.

discordDiscord Support


Prerequisites

Before we begin, ensure you have the following:

  • Unreal Engine Version: The plugin supports UE 5.6 and 5.7.2+.

  • Plugin Installed: Ensure the plugin is installed to your Engine version before creating a project.


1. Project Creation & Initial Fixes

Project Setup

  1. Create a new project using the First Person Template.

  2. Select the Blueprint version.

  3. Choose the Arena Shooter variant.

Fixing the Mannequin Mesh

The default Shooter Template uses "Simple" mannequins that lack essential bones (like weapon_r).

  1. Import Original Manny: Import the standard Unreal Engine Mannequin mesh.

    1. If you don't have it, feel free to use this onearrow-up-right.

  2. Verify Bones: Ensure the weapon_r bone is present and active.

  3. Set Preview Mesh: In the Skeleton Editor, set the newly imported mesh as the Preview Mesh in the Preview Settings.


2. Plugin Activation & Skeleton Setup

  1. Go to Edit > Plugins, search for Procedural First Person, and enable it.

  2. Restart the Engine.

  3. Setup Skeleton: * Navigate to your Skeleton asset.

    • Right-click -> Scripted Asset Actions -> Setup Skeleton.

    • Feel free to leave all marked. I'll be choosing "Setup Hands" and "Setup Single Wield".

    • This will automatically create the necessary Virtual Bones (VBs) under the Head bone for procedural movement.


3. Animation Blueprint (ABP) Consolidation

To keep things efficient, we will use a single base Animation Blueprint.

  1. Standardize Weapons: Open your weapon Blueprints (Rifle, Pistol, Launcher) and change their Animation Blueprint to ABP_FP_Copy.

  2. Base ABP: Rename ABP_TP_Rifle to ABP_Weapon. This will be our core logic hub.

  3. Update References: Ensure Shooter Weapon Base and individual weapon BPs point to ABP_Weapon for third-person and ABP_FP_Copy for first-person.

ABP Logic Adjustments

Inside ABP_FP_Copy:

  • Remove Control Rig keeping only the Copy Pose From Mesh.

Inside ABP_Weapon:

  • Rotation Blend: Change the Layered Blend Per Bone (Spine_01) to Mesh Space instead of Local Space to avoid spinal distortion.

  • Pose Style: Use Single Frame Animation for the first-person pose to ensure stability.

    • Right-click the Sequence Player and select "Convert to Single Frame Animation".


4. Character Configuration

Open your ShooterCharacter Blueprint:

  1. Mesh: Set the Mesh to the original SKM_Manny we imported.

  2. Camera: Reset the Camera Component position and rotation to (0, 0, 0).

  3. FOV: Set both the standard FOV and First Person FOV to 90 to prevent perspective issues.

  4. Search for the Attach Weapon Meshes function.

  5. Change the attachment socket from HandGrip_R to VB Pivot.


5. Integrating Procedural First Person

Before implementing the procedural motion functions, you must stabilize the character's perspective and ensure the weapon is oriented correctly for the plugin to calculate movement accurately.

Head Stabilization

To prevent the camera from tilting unnaturally with the character's animations in first-person, you need to stabilize the head bone.

  • In the ABP_Weapon Anim Graph, add a Transform (Modify) Bone node.

  • Select the head bone.

  • Set the Rotation Mode to Replace Existing.

  • Change the Y rotation value to 90.

  • This ensures the head stays level regardless of the body's pose.


Weapon Mesh Orientation

The plugin requires weapons to point toward the Positive X axis for maximum stability. If your mesh is oriented differently, you must correct it within a dedicated Animation Blueprint for the weapon.

  • Create a new Animation Blueprint for your weapon mesh (e.g., ABP_Rifle).

  • Add a Transform (Modify) Bone node targeting the root-most bone.

  • Set the Rotation Mode to Add to Existing.

  • Set the Z-axis rotation to -90.

  • Verify that the weapon is now pointing forward along the X axis.


Establishing the Positional Source

Next, you must link the animation's weapon bone to the virtual bone used by the procedural system.

  • In your main ABP_Weapon, add a Copy Bone node.

  • Set the Source Bone to weapon_r.

  • Set the Target Bone to VB hand_r_to_ik_hand_hun.

  • In the node settings, uncheck Scale and ensure only Translation and Rotation are enabled.


Variable Setup

In Shooter Weapon Base, create these Instance Editable variables:

  • Origin Relative Rotation (Rotator)

  • Attach Relative Rotation (Rotator)

  • Attach Relative Location (Vector)

circle-info

Make sure to enable Instance Editable (eye icon), in order to be able to edit these variables in runtime.


Shooter Character Reference

In your ABP_Weapon Event Graph (Initialization), after the Character reference save, cast it to BP_ShooterCharacter and save as a Variable.

Procedural Bone Rebase

The Procedural Bone Rebase node is essential for correcting the positioning of bones that will perform procedural movements.

  1. In your ABP_Weapon Anim Graph, after the Copy Bone, add the Procedural Bone Rebase node.

  2. Set the Source to VB hand_r_to_ik_hand_hun and the Target to VB pivot.

    • Note: The Pivot is the bone where your weapon is attached.

  3. Virtual Bone Resets: Add four entries to the node to reset the position of the hand and elbow virtual bones:

    • hand_r -> VB pivot_hand_r

    • hand_l -> VB pivot_hand_l

    • lowerarm_l -> VB pivot_lowerarm_l

    • lowerarm_r -> VB pivot_lowerarm_r


Aim Offset Integration

To ensure the weapon follows the camera rotation seamlessly, add the Procedural Aim Offset node at the end of your animation flow.

  • The node automatically calculates camera rotation and applies it to the pre-filled spine chain.

  • This setup provides a responsive follow-effect without jitter/delay.


Creating the Procedural Motion Input

The Procedural Motion node is the primary driver of the plugin. It moves the pivot, and the arms/elbows follow automatically as they are child virtual bones.

The Input Function

  1. Create a new function named GetProceduralMotionInput.

  2. Set it to Pure, Const, and Thread Safe.

  3. Add an output variable of type Procedural Motion Input named Return Value.

  4. Inside the function, use a Make Procedural Motion Input node.

  5. Source Actors: Create a Make Array and use Property Access to link the Shooter Character -> Current Weapon. This allows the node to read components directly from the weapon actor.

  6. Perspective Check: Connect Shooter Character -> Is Locally Controlled to the boolean input. This determines if the procedural effects should be active based on the player's perspective.

Add Procedural Motion Anim Node

  1. Create the Procedural Motion node.

  2. Right-click "Input" -> Select our newly created function.

  3. At "Bone to Modify" -> Select VB pivot.


Correcting Weapon Offsets

circle-exclamation
  1. After your positioning Copy Bone, add a Modify Bone node.

  2. Select bone: VB hand_r_to_ik_hand_gun.

  3. Translation & Rotation Mode: Set both to Add to Existing.

  4. Translation & Rotation Space: Set both to Bone Space.

  5. Bind the Translation to Current Weapon -> Attach Relative Location and Rotation to Current Weapon -> Attach Relative Rotation.

    1. We created these variables in here.


Finalizing with Hand IK

To lock the hands to the VB pivot, add the Procedural Hand IK node after the Aim Offset.

  • Map the standard hand bones to their pivot equivalents (e.g., Hand L to Pivot Hand L, Lower Arm L to Pivot Lower Arm L).


Components and Real-Time Tweaking

You can now add specific motion components to your weapon Blueprints for unique feel.

  1. In the Rifle BP, I found out that using -4.0 is Y for Attach Relative Rotation fixes the wrong placement from the template animations.

  2. Add Components: In your Base Weapon BP, add a Procedural Sway Motion Component and a Procedural Offset Motion Component.

  3. Create Preset Data: Right-click in the Content Browser > Miscellaneous > Data Asset > Procedural Preset Data.

  4. Assign Presets: Select your new Data Asset in the component settings of your weapon.

  5. Live Edit: While the game is running (PIE), open the Preset Data asset. Any changes you make to the Sway, Offset, or Pivot (e.g., moving the weapon closer to the body) will persist and update in real-time.

Attach Relative Rotation for Rifle BP
Create the Data Asset: Content Browser > Miscellaneous > Data Asset. Select "Procedural Preset Data"
Procedural Motion Components (I added Offset and Sway for now)
At each one of the Procedural Motion Components, make sure to select the correct Preset Data for that Weapon BP

6. Check Progress


Next Steps

In Part 2, we will cover:

  • Integrating the Recoil system.

  • Adding more Procedural Motion Components.

  • Specific configurations for different weapon types like Pistols.

Last updated