# Weapon

## Step 1 - Add FPSAnimWeapon

Similarly to the character, your weapon class also needs to be derived from a special animation abstract class - <mark style="color:purple;">**FPSAnimWeapon**</mark>.

{% code title="YourWeapon.cs" overflow="wrap" %}

```csharp
public class YourWeapon : FPSAnimWeapon //<- inherit from FPSAnimWeapon
{
}
```

{% endcode %}

The only change you need to make is to override the **GetAimPoint()** method:

{% code title="Weapon.cs" overflow="wrap" %}

```csharp
public override Transform GetAimPoint() //<- override this in your Weapon class
{
    _scopeIndex++;
    _scopeIndex = _scopeIndex > scopes.Count - 1 ? 0 : _scopeIndex;
    return scopes[_scopeIndex];
}    
```

{% endcode %}

In this code we iterate over all scope transforms when player changes a scope.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kinemation.gitbook.io/fps-animation-framework/tutorial/integration/weapon.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
