# First-Person Controller

Make sure to take a look at [First-Person Controller docs](/fps-framework/tutorials/character/first-person-controller.md) for the base asset first.

## Networking

{% hint style="success" %}
Before attempting to network anything, make sure to have a NetworkManager in your scene.
{% endhint %}

To network any of the built-in components from the base asset, simply right-click on the component to reveal the following menu:

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

At the bottom there's Setup > Network Components, by clicking on it the essential networking is setup automatically as seen below:

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

All what's left by now is to assgin this FPS Controller to PlayerPrefab in your NetworkManager.

## Visuals

To add visuals that are visible to other players but not to yourself, attach them as a child of the **Orientation** GameObject, which is itself a child of your **First Person Controller**.

At this point, the visual should appear and behave as expected, but it won’t automatically enable or disable based on whether it’s the local player. To fix this, assign the **Orientation** object or the mesh you added to the **PlayerObject** field in the **NetworkFirstPersonController** component.

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

## Locomotion

If your character uses animations, you’ll need to add the **PlayerLocomotion** component. This component automatically updates certain parameters in your **Animator** to enable and control locomotion animations properly.

{% hint style="info" %}
Locomotion can vary greatly between projects. If the default component doesn’t fit your needs or the way you handle animations, you can always create your own custom implementation.
{% endhint %}

The **PlayerLocomotion** component directly plays **Jump** and **Land** animations without using transitions. It also updates the **MoveX**, **MoveY**, **IsGrounded**, and **IsRunning** parameters in the **Animator** based on the character’s current state.


---

# 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://akila.gitbook.io/fps-framework/tutorials-pro-only/character/first-person-controller.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.
