# First-Person Controller

Make sure to take a look at [First-Person Controller docs](https://akila.gitbook.io/fps-framework/tutorials/character/first-person-controller) 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="https://512600823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLQgz9gGwkU5HhRwKT3te%2Fuploads%2FRmnwyFvLRbhRfPBNorij%2FScreenshot%202025-10-10%20194942.png?alt=media&#x26;token=8134c6a8-c337-4d1b-93fd-799f849f3efa" 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="https://512600823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLQgz9gGwkU5HhRwKT3te%2Fuploads%2FQAHTh9Ve2yUfN90OGVBD%2FScreenshot%202025-10-10%20195120.png?alt=media&#x26;token=a629b0ad-4e2e-4c60-9bb7-5a9ea5db0bed" 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="https://512600823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLQgz9gGwkU5HhRwKT3te%2Fuploads%2FwZijfHDNHr6oT56G4RnU%2FScreenshot%202025-10-10%20195529.png?alt=media&#x26;token=89fa0e38-f041-4d6b-a52c-ffb7c888e86e" 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.
