> For the complete documentation index, see [llms.txt](https://docs.infimagames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infimagames.com/product/tactical-fps-animation-packs/guides-and-tutorials/editor/use-the-weapons-on-your-own-character.md).

# How to Use the Weapons on Your Own Character

Set up your own UE5 Manny character to fire, aim and reload with the Tactical FPS Animations weapons in Unreal Engine 5, in first or third person, then test it in Play.

{% hint style="info" %}
This page is about our demo showcase Blueprints. The Blueprints are mainly meant for showcase purposes, and aren't intended to be used as an FPS template out of the box.
{% endhint %}

#### Table of Contents

* [Introduction](#introduction)
* [Make Your Skeleton Compatible](#make-your-skeleton-compatible)
* [Add the Weapon Component and Pick a Weapon](#add-the-weapon-component-and-pick-a-weapon)
* [Pick the Starting View](#pick-the-starting-view)
* [Copy the Sockets From Our Skeleton](#copy-the-sockets-from-our-skeleton)
* [If Your Game Is First Person](#if-your-game-is-first-person)
  * [If Your View Looks Up and Down](#if-your-view-looks-up-and-down)
* [If Your Game Is Third Person](#if-your-game-is-third-person)
* [Connect Your Input](#connect-your-input)
  * [The Quick Way: Copy Our Input Events](#the-quick-way-copy-our-input-events)
  * [Or Call the Weapon Component Yourself](#or-call-the-weapon-component-yourself)
* [React to the Weapon](#react-to-the-weapon)
* [If Your Game Switches Between Both](#if-your-game-switches-between-both)
* [Test It in Play](#test-it-in-play)

***

### Introduction

***

In this guide, I'll show you how to get your own character firing, aiming and reloading with the pack's weapons, with the Weapon Component our showcase uses. I'll use the Pistol. The Assault Rifle works the same way.

The first steps are for every character. Then follow the first person or the third person part.

<div align="left"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FN7TZvPuFBUWJE06Si8kO%2FSL-UTW-06.png?alt=media&amp;token=983b9c7d-7b1f-4222-8a2e-3365cbb8f3cd" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FPtlvnzqBDOA7r6QjspNR%2FSL-UTW-07.png?alt=media&amp;token=bd00d9f7-5a76-4a34-a91a-82e390258aa9" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}

#### Before You Start

* Your character is on the **UE5 Mannequin** skeleton.
* First person needs a **first person mesh**, like our `SKM_FP_Manny_Simple`. Third person needs a **full-body mesh**, like the Third Person template's.
* Change **your own character Blueprint**, not the pack's files. An update replaces every file of the pack (see [Updating the Pack](https://docs.infimagames.com/product/tactical-fps-animation-packs/getting-started/updating-the-pack.md)).
  {% endhint %}

***

### Make Your Skeleton Compatible

***

1. Open your character's Skeleton asset, or your skeletal mesh's **Skeleton** tab (top right).
2. In **Asset Details** (**Window > Asset Details**), add `SKEL_TFA_Mannequin` under **Compatible Skeletons**.

In the UE5 Third Person template, the skeleton is `SK_Mannequin` (not the `SKM_Manny` or `SKM_Quinn` meshes), in `Characters/Mannequins/Meshes`.

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2Fq5aZNkyU2k9AeT51M7Z7%2Ftrouble-01.png?alt=media&amp;token=b8035444-ae39-4923-85a5-ca1afdd3d1a1" alt="" width="563"><figcaption></figcaption></figure></div>

Our animations then show up for your mesh, for example when you pick an animation for it.

{% hint style="info" %}
Compatible Skeletons keeps your mesh on its own skeleton, which is what we recommend. Assign Skeleton moves a mesh onto our skeleton instead, as in [How to Assign a Custom Character Model](https://docs.infimagames.com/product/tactical-fps-animation-packs/guides-and-tutorials/editor/how-to-assign-a-custom-character-model-in-unreal-engine-5-ue5-manny.md).
{% endhint %}

***

### Add the Weapon Component and Pick a Weapon

***

Add `BP_TFA_WeaponComponent` to your character Blueprint. It's in `Content/InfimaGames/TacticalFPSAnimations/Common/Framework/Components`. Then set it up in the Details panel.

| Setting                        | Set it to                                             |
| ------------------------------ | ----------------------------------------------------- |
| **Weapon Config**              | The weapon to use, for example `DA_TFA_Pistol`        |
| **Loadout** (optional)         | Every weapon the character carries, in slot order     |
| **Spawn Weapon on Begin Play** | Ticked, so the weapon is in hand when the game starts |

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2F3MEFRdFKJjbAXog2KQqy%2Fcr-character-01.png?alt=media&amp;token=ab453ef3-cfca-458a-92e8-f7daf36741d7" alt="" width="563"><figcaption></figcaption></figure></div>

<details>

<summary>More about the Loadout, and a different visible mesh</summary>

* The Loadout has no fixed limit. Cycle Weapon goes through all of them, and in the showcase the number keys 1 to 4 draw the first four.
* The skeleton has two holster sockets, back and hip, so a third holstered weapon shares one with another.
* If the player sees a different skeletal mesh component, for example a visible mesh that follows a hidden one, give that mesh a component tag. Enter the same tag in the Weapon Component's **Character Mesh Tag**. The component then animates that mesh and attaches the weapons to it.

</details>

***

### Pick the Starting View

***

On the Weapon Component, set **Current Camera Perspective** to **FirstPerson** or **ThirdPerson**, the view your character starts in.

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FXdQqXXV2myCfuW2de9zs%2FSL-UTW-09.png?alt=media&amp;token=423a990f-bfe0-45f7-b62b-ac21d914d732" alt="" width="563"><figcaption></figcaption></figure></div>

The component plays that view's montages, so match it to your camera.

***

### Copy the Sockets From Our Skeleton

***

| Socket                                                                 | Used for                                                                           |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `SOCKET_Holster_Back` on `spine_05`, `SOCKET_Holster_Hip` on `thigh_r` | Holstered weapons                                                                  |
| `SOCKET_Hand_L_Throw` on `ik_hand_l`                                   | The heal montages                                                                  |
| `SOCKET_CameraFP`                                                      | Your first person camera, if you attach it to the socket                           |
| `SOCKET_HelmetCamera`, `SOCKET_ChestCamera`                            | Our showcase's helmet and chest camera views, which drop to the floor without them |

1. Open `SKEL_TFA_Mannequin`.
2. Select these sockets.
3. Right-click and pick **Copy Selected Sockets**.
4. Open your own skeleton.
5. Right-click and pick **Paste Sockets**.

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FjnlJtadYLuf7K6yhlWVN%2FSL-UTW-02.png?alt=media&amp;token=c6514912-19fe-455a-8576-be8f912fc255" alt="" width="470"><figcaption></figcaption></figure></div>

Without the holster sockets, a holstered weapon, its magazine and laser stay hidden until drawn. Holstered weapons only show on a full-body mesh, in third person.

***

### If Your Game Is First Person

***

1. Set your character's Mesh to your first person mesh, like our `SKM_FP_Manny_Simple`.
2. Set its **Anim Class** to `ABP_TFA_FP_BaseCharacter`.
3. Add a camera as a child of the Mesh.
4. Set the camera's **Parent Socket** to the `head` bone, or to `SOCKET_CameraFP` on `head` if you'd rather use the socket.
5. Set its **Rotation** to X -90 and Z 90, so it faces forward.
6. From the Third Person template? Remove its **CameraBoom** and **FollowCamera**, or untick **Auto Activate** on FollowCamera.
7. Keep the Mesh under the Capsule Component, as the Third Person template has it.

With both cameras active, Play uses the FollowCamera behind your character.

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FN1TKybxU0J52IiUmVTgz%2FSL-UTW-04.png?alt=media&amp;token=c3b48c41-3e66-4127-9e8d-db49a36fd6cd" alt="" width="563"><figcaption></figcaption></figure></div>

The camera moves with the animations through the `head` bone. **Animate Camera** on the Weapon Component turns that on and off.

<details>

<summary>First person walk, crouch, run and sprint</summary>

Each weapon's first person walk, crouch, run and sprint are in its data asset. To play them, call the Weapon Component from your movement input (see [Connect Your Input](#connect-your-input)).

| Movement | Data asset field           | Called with         |
| -------- | -------------------------- | ------------------- |
| Walk     | **Blendspaces Locomotion** | **Set Move Input**  |
| Crouch   | **Blendspaces Locomotion** | **Toggle Crouch**   |
| Run      | **FP Run Loops**           | **Start Running**   |
| Sprint   | **FP Sprint Loop**         | **Start Sprinting** |

**Toggle Crouch** plays the crouched animations, but it doesn't lower the view, and neither does the engine's own **Crouch**. For a lower crouched view, move the Mesh down while crouched, as our showcase does.

</details>

<details>

<summary>How our showcase character places its Mesh</summary>

* The same order as above, Capsule Component > Mesh > camera.
* Its **Apply Mesh Transform** function places the mesh at **Mesh Base Location** (0, 0, -88), turned -90 on Z.
* While crouched it uses **Mesh Base Location** Z -150 instead of -88, which lowers the view. The engine's **Crouch** shrinks the capsule and keeps the feet on the floor, so on its own the view stays at standing height.

</details>

#### If Your View Looks Up and Down

If your view looks up and down, the arms have to turn with it, around the eyes, or the weapon drifts off the sights. The showcase camera doesn't, so our character skips this.

<details>

<summary>Turn the arms with the view</summary>

The Mesh comes from the Character class and can't move under another component, so turn it in a function.

1. Add a vector variable, **Eye Offset**, set to the eye point measured from the Mesh's origin at the feet. On the UE5 Mannequin that's (0, 0, 162.6).
2. Add a function, **Apply View Pitch**, that sets the Mesh's **Relative Location And Rotation** from the Character's own base values and the control pitch. For the control pitch, break **Get Control Rotation** and make a rotator from only its **Pitch**. Then set:
   * New Location = **Get Base Translation Offset** + Eye Offset - **Rotate Vector** (Eye Offset, by the control pitch)
   * New Rotation = **Combine Rotators** (**Get Base Rotation Offset**, the control pitch)
3. Call **Apply View Pitch** from **Event Tick**.
4. Make sure your look event pitches the controller, by sending its Y value into **Add Controller Pitch Input**. The Third Person template's look event already does.

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FgqIhGGScfTIceDppoBaK%2FSL-USE-PITCH-01.png?alt=media&amp;token=f7a4e8f7-7455-4c4a-8cc7-f106b9ea5649" alt=""><figcaption></figcaption></figure></div>

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FyWnAY9jTvcukAaUOLTNx%2FSL-USE-PITCH-02.png?alt=media&amp;token=64506348-7c6f-48b2-a60c-35708e6675ba" alt=""><figcaption></figcaption></figure></div>

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FD9RjE1L4LbZu9sQ2QoH1%2FSL-USE-PITCH-03.png?alt=media&amp;token=bd20d7bf-fccb-4ed8-83c3-07fe0c629df2" alt=""><figcaption></figcaption></figure></div>

* The base values follow the engine's crouch, so the body turns around the eyes standing and crouched, and the camera still moves with the animations.
* The look picture uses our `IA_TFA_Look`. Its multiply by -1 is only needed if moving the mouse up looks down in your project.
* Also third person? Call Apply View Pitch only in first person, for example with a Branch on the Weapon Component's **Current Camera Perspective**. When you switch to third person, set the Mesh back to Get Base Translation Offset and Get Base Rotation Offset, so the body stands upright.

</details>

***

### If Your Game Is Third Person

***

1. Keep your full-body mesh on your character's Mesh (in the UE 5.4 Third Person template that's `SKM_Quinn_Simple`).
2. Set its **Anim Class** to `ABP_TFA_TP_BaseCharacter`.

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FyMJNDPTEQbmIVEScNnIR%2FSL-UTW-10.png?alt=media&amp;token=a5d4a68d-2c79-4c87-84c9-d4f3587cf4d5" alt="" width="563"><figcaption></figcaption></figure></div>

It plays the weapon's pose and actions on the full body, with recoil, breathing and hand IK on the `ik_hand_l` and `ik_hand_r` bones (the UE5 Mannequin has them).

{% hint style="warning" %}
The pack has no third person movement animations, so the legs don't walk. To walk with your own locomotion, layer the upper body of the weapon animations over it, for example with a **Layered blend per bone** from `spine_01`.
{% endhint %}

***

### Connect Your Input

***

Your character calls the Weapon Component from its input events. For the showcase's keys, add our `IMC_TFA_Default` (in `Content/InfimaGames/TacticalFPSAnimations/Common/Framework/Inputs`) from **Event BeginPlay**.

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FuHGY0p9g7GwL2leRfUPH%2FSL-UTW-03.png?alt=media&amp;token=196200fe-3140-47c8-862f-028d1afbe5da" alt=""><figcaption></figcaption></figure></div>

1. Add an **Add Mapping Context** node after **Event BeginPlay**. If your BeginPlay already has nodes, such as the Third Person template's own **Add Mapping Context**, connect yours after the last one. If the node isn't listed when you search for it, untick **Context Sensitive** at the top of the menu.
2. Set its **Mapping Context** to `IMC_TFA_Default`.
3. Set its **Priority** to -1.
4. Add **Get Player Controller**.
5. Drag off its **Return Value** and add **Get EnhancedInputLocalPlayerSubsystem** (type *enhanced input* to find it).
6. Plug it into the **Target** of **Add Mapping Context**.

{% hint style="warning" %}

* Use the subsystem node that has a **Player Controller** pin. With **Context Sensitive** unticked, the menu also lists one without that pin. It compiles, but it doesn't find the subsystem in Unreal 5.4 to 5.6, and then none of the weapon keys work.
* Don't skip the -1. At the same priority as your own mapping context, your character stops moving and looking, and there's no error to tell you why.
  {% endhint %}

The screenshot's **Get Controller** and **Cast To PlayerController** work too. Our showcase character uses **Priority** 0, because it has no other mapping context.

#### The Quick Way: Copy Our Input Events

1. Rename the Weapon Component on your character to `WeaponComponent`, the same name as ours. The pasted nodes look for that name.
2. Open the Event Graph of `BP_TFA_BaseCharacter`.
3. Select the input events you want and copy them. Deselect `IA_TFA_Look`, `IA_TFA_Zoom` and `IA_TFA_ToggleCameraPerspective`, which share the ADS comment box.
4. Paste into an empty spot of your character's Event Graph, or into a new graph (**+** next to **Graphs** in the My Blueprint panel).
5. If a **Fix Self Context Function References** dialog appears, click **Confirm**.
6. Delete those three events if they came along. They're the ones that bring up that dialog.
7. Delete every **Show Third Person Warning** node and the **Widget BP** node wired into each. **Find in Blueprint** for `Show Third Person Warning` finds all four.
8. In Jump and Crouch you can also delete the Branch and connect **Triggered** straight to the Weapon Component call.
9. Compile. It compiles without errors.

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FJab9PoURF1CY8mP0vRCk%2FSL-UTW-13a.png?alt=media&amp;token=acd4e04e-52f3-4048-a2dd-0c692c19681c" alt=""><figcaption></figcaption></figure></div>

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FDpRtPWMhHkovWvCj9lkT%2FSL-UTW-13b.png?alt=media&amp;token=e0cb0ffe-d116-457e-93a0-b450c6764538" alt=""><figcaption></figcaption></figure></div>

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FtkpBqAikU0Iv27Bg4gCm%2FSL-UTW-13c.png?alt=media&amp;token=7899448d-446e-495a-96a4-8476e02a9cfe" alt=""><figcaption></figcaption></figure></div>

| Group                                       | Input actions                                                                                                 | Key in `IMC_TFA_Default`                                                        |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Combat                                      | `IA_TFA_Fire`, `IA_TFA_ADS`, `IA_TFA_CantedAiming`, `IA_TFA_FireModeSwitch`                                   | LMB, RMB, Middle Mouse, V                                                       |
| Reload                                      | `IA_TFA_Reload_MagCheck`, `IA_TFA_Reload_Quick`, `IA_TFA_Reload_Empty`                                        | R (tap to reload, hold to check the magazine), Q, E (hold to keep the magazine) |
| Weapons                                     | `IA_TFA_Equip`, `IA_TFA_SelectWeapon`, `IA_TFA_CycleWeapon`                                                   | H, 1 to 4, Y on a gamepad                                                       |
| Actions                                     | `IA_TFA_Inspecting`, `IA_TFA_Melee`, `IA_TFA_GrenadeThrow`, `IA_TFA_Heal`, `IA_TFA_Interact`, `IA_TFA_Rack`   | T, F, G, U, X, K                                                                |
| Showcase extras                             | `IA_TFA_CycleGrip`, `IA_TFA_RandomizeAttachments`, `IA_TFA_WeaponJam`, `IA_TFA_ToggleCameraAnimation`         | None. B, N, J and L in `IMC_TFA_Demo`                                           |
| Movement (third person HUD warning, step 7) | `IA_TFA_Crouch`, `IA_TFA_Jump`, `IA_TFA_Move`, `IA_TFA_Run`, `IA_TFA_Sprint`                                  | C, Spacebar, WASD, Left Shift, Left Alt                                         |
| Don't copy                                  | `IA_TFA_Look`, `IA_TFA_Zoom`, `IA_TFA_ToggleCameraPerspective`                                                | They move our showcase camera. Keep your own look and camera                    |
| Showcase only                               | `IA_TFA_FreezeTime`, `IA_TFA_CycleQuality`, `IA_TFA_ToggleUI`, `IA_TFA_ToggleTutorialText`, `IA_TFA_QuitGame` | Leave them out                                                                  |

Combat to Showcase extras copy over as they are and only call the Weapon Component.

{% hint style="warning" %}
In third person, jump plays nothing and crouch only changes the stance. Crouch, jump, run, sprint and move are first person features, since the pack has no third person movement, and your copy won't show our showcase's warning about it.
{% endhint %}

<details>

<summary>Details</summary>

* The four showcase extras (cycle grip, weapon jam, random attachments and the camera shake toggle) have no key in `IMC_TFA_Default`. The best way is to give them a key in your own mapping context. You can also add `IMC_TFA_Demo`, but it brings the other showcase keys with it, like Tab, Esc, O and the Numpad keys.
* Jump only plays the jump animation. Add your character's own **Jump** after **Play Jump**, and **Stop Jumping** on Completed if you want it.

</details>

#### Or Call the Weapon Component Yourself

To connect your own input actions, call the Weapon Component from each input event. These are the main ones.

| Input               | When you press it                              | When you let go              |
| ------------------- | ---------------------------------------------- | ---------------------------- |
| Fire                | **Start Fire**                                 | **Stop Fire**                |
| Aim                 | **Start Aiming**                               | **Stop Aiming**              |
| Run                 | **Start Running**                              | **Stop Running**             |
| Tactical sprint     | **Start Sprinting**                            | **Stop Sprinting**           |
| Move (first person) | **Set Move Input** with the value              | **Set Move Input** with zero |
| Reload              | **Play Reload**                                |                              |
| Crouch              | **Toggle Crouch**                              |                              |
| Holster and draw    | **Toggle Holster**                             |                              |
| Weapon slot         | **Switch Weapon** with the slot, starting at 0 |                              |
| Inspect             | **Play Inspect**                               |                              |

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FZHjJUUWPzb6mJK1R4L35%2FSL-UTW-11.png?alt=media&amp;token=bb4eb77f-b877-4dfe-9014-5bc1dca5975e" alt=""><figcaption></figcaption></figure></div>

* Every other action has its own call too, like the quick reload, mag check, melee, grenade and your own actions. See the [Weapon Component (BP\_TFA\_WeaponComponent)](https://docs.infimagames.com/product/tactical-fps-animation-packs/guides-and-tutorials/reference/blueprints/weapon-component-bp_tfa_weaponcomponent.md) page.
* The component won't start a new action while one is playing, so you don't need to check.

{% hint style="info" %}
To change a key, duplicate `IMC_TFA_Default`, change the copy, and add the copy at **Priority** -1 instead. Updating the pack can replace its files, so a change to the original could be lost.
{% endhint %}

***

### React to the Weapon

***

For your HUD, sounds or gameplay, bind the Weapon Component's events. These are the ones you'll use most.

| Event              | When it fires                                                                      |
| ------------------ | ---------------------------------------------------------------------------------- |
| On Weapon Fired    | A round left the weapon. It gives you the muzzle transform.                        |
| On Ammo Changed    | The cosmetic round count changed. It drives the magazine and the empty animations. |
| On Weapon Changed  | The weapon in hand changed.                                                        |
| On Action Finished | An action like a reload played through or was cut short.                           |

The pack has no hit detection and only a cosmetic round count, so damage and gameplay ammo are yours. On Weapon Fired is where a trace would go. More in [Firing, Running Dry and Jams](https://docs.infimagames.com/product/tactical-fps-animation-packs/guides-and-tutorials/editor/firing-running-dry-and-jams.md), and every event is on the [Weapon Component (BP\_TFA\_WeaponComponent)](https://docs.infimagames.com/product/tactical-fps-animation-packs/guides-and-tutorials/reference/blueprints/weapon-component-bp_tfa_weaponcomponent.md) page.

***

### If Your Game Switches Between Both

***

Do both view parts above first. When the view changes, swap the mesh and the Anim Class together, as our showcase character does in **Enable First Person Perspective** and **Enable Third Person Perspective**.

| View         | Mesh                                                                               | Anim Class                 |
| ------------ | ---------------------------------------------------------------------------------- | -------------------------- |
| First person | Your first person mesh (ours: `SKM_FP_Manny_Simple`)                               | `ABP_TFA_FP_BaseCharacter` |
| Third person | Your full-body mesh (the template's `SKM_Quinn_Simple`, or our `SKM_Manny_Simple`) | `ABP_TFA_TP_BaseCharacter` |

<details>

<summary>Keep an animation playing through the switch, like the P key in the showcase</summary>

1. Call **Set Camera Perspective** on the Weapon Component with the new view, so the component plays that view's montages.
2. Call **Get Synced Montage Position** before you change the mesh. Store its **Can Resume** and **Position** in two variables, or wire them straight across if it's all one chain.
3. Change the mesh, the Anim Class and the camera. For the camera, call **Set Active** on the camera for the new view and turn the other one off.
4. If **Can Resume** was true, call **Resume Synced Montage** with the position.
5. If it was false, call **Stop Weapon Animation** and **Destroy Attached Item** instead.

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2F21ROZX2wlYXSsjRVWePp%2FSL-UTW-12a.png?alt=media&amp;token=884a02aa-b803-4c28-b364-f15155754790" alt=""><figcaption></figcaption></figure></div>

<div align="left" data-with-frame="true"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2F2XQHXirF8m8tycSKE1iB%2FSL-UTW-12b.png?alt=media&amp;token=a98a99c8-1716-4c78-9bdd-e20a9a8019fd" alt=""><figcaption></figcaption></figure></div>

* Our showcase character does this in **Toggle Camera Perspective**, which calls Set Camera Perspective and then **Update Camera Perspective**.
* **Can Resume** is false when the action can't keep playing in the new view, for example when the position is already past the end of that view's montage.

</details>

***

### Test It in Play

***

Hit **Play** in your own map and try fire, aim and reload on your character.

To compare, play `L_TFA_Pistol_Showcase`, or `L_TFA_AR_Showcase` for the Assault Rifle. With `IMC_TFA_Default` as it is, the weapon keys are the same as in the showcase.

<div align="left"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FIiAcObQYxUhHRBqh09Ue%2FSL-UTW-05.png?alt=media&amp;token=512ef9ad-6a63-4c06-a0c5-e0391aea66f4" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3271331258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuuZjeeFspZ4mvcxHpS6M%2Fuploads%2FLbIqiGiVlxDOFBAlbXZY%2FSL-UTW-08.png?alt=media&amp;token=27d2209d-5463-40cb-8ab2-6107fec52e61" alt=""><figcaption></figcaption></figure></div>

That's it! Your character now plays the pack's animations, have fun with them.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.infimagames.com/product/tactical-fps-animation-packs/guides-and-tutorials/editor/use-the-weapons-on-your-own-character.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
