# Weapon Spline Setup

### **1. Magazine Ejection Spline**

#### **Quick Setup**

1. Go to **Construction Script**
2. Add **Add Static Mesh Component** → select your **Magazine Mesh**
3. Use Get **Magazine Ejection Spline** → **Get Location at Spline Point** → connect to Location
4. **Point Index = 0** , **Coordinate Space** = World
5. **Compile.**

<figure><img src="/files/GVfJjRg9ZAjrcYEwPmYW" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/RTRb4roW9xB8ttZ3r1Si" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/pqXXPTUSjN51qCB3npgx" alt=""><figcaption></figcaption></figure>

this will determine magazine drop start position.Once it placed correctly.\
Then Construction Script set **Point Index to 1** and on spline set **Input Key 1**. then setup last position. &#x20;

<figure><img src="/files/mYjTYDLJLfZZSJgGx0i4" alt=""><figcaption></figcaption></figure>

<div align="left"><figure><img src="/files/WGYawmKsMCiCvGjKxTEr" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Set Positions**

* **Point Index = 0** → Place at **magazine attached position**
* **Point Index = 1** → Place at **final drop position**

⚠️- Once all Done. **Delete Logic that we made inside Contruction script**&#x20;

***

### 2. Scope Attachment Rail / Spline

#### **Quick Setup**

1. Go to **Construction Script**
2. Add **Add Static Mesh Component** → select your **Scope Mesh**
3. Use Get **Magazine Ejection Spline** →&#x20;
   * **Get Location at Spline Point** → connect to Location
   * **Get Rotation at Spline Point** → connect to Rotation
4. **Point Index = 0** , **Coordinate Space** = World
5. **Compile**

<figure><img src="/files/i6Bdu0VwxMStOjKk1YpV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/bS4UR4HlqxkRChfx93FM" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/mbPPGxnLdtuyClQvcjT4" alt=""><figcaption></figcaption></figure>

this will determine Scope attachable rail position. Once it placed correctly.\
Then Construction Script set **Point Index to 1** and on spline set **Input Key 1**. then setup last position.&#x20;

<figure><img src="/files/TiO93xKv5NLdYNT1ItU8" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ofKPKN9UynY3KfmoIavJ" alt=""><figcaption></figcaption></figure>

#### **Set Positions**

* **Point Index = 0** → Place at **start of rail** → Compile
* **Point Index = 1** → Set **Input Key = 1** → Place at **end of rail**

#### **Important Behavior**

* Scope can attach **anywhere between Point 0 → Point 1**
* This defines the **usable rail area**, not just a single point

⚠️ Once setup is complete, **delete the Construction Script logic**

***


---

# 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://voxel-vision.gitbook.io/advanced-vr-template/add-your-own-weapon/interactive-blocks.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.
