0% found this document useful (0 votes)
10 views8 pages

FPS (Unity 2021.3 LTS)

Uploaded by

kentoniiiiwwy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views8 pages

FPS (Unity 2021.3 LTS)

Uploaded by

kentoniiiiwwy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

First Person Controller

Setup
Creating the project
Importing the Starter Assets
Changing the Input System

Import the FPS Controller


Setup

Creating the project


Open Unity 2021.3 LTS and create a new project.
Unity has been recently changing the UI of Unity Hub, so you might see one of those
screens:
Make sure you are selecting the core/built-in 3D template. In this module we will not use
HDRP or URP, which are different ways in which Unity renders its graphics.
Importing the Starter Assets
Click on Window > Asset Store; this will open a web page.
Search for “Starter Assets”, or visit this page:
https://assetstore.unity.com/packages/essentials/starter-assets-first-person-character-control
ler-196525

Click on “Add to My Assets”. You might need to login into your Unity account. After that,
click on “Open in Unity”. The asset will not appear in the Package Manager, ready to be
imported.

During the years, Unity has created and maintained a lot of different packages to support the
creation of games. Both First Person and Third Person controllers were originally shipped
inside Unity and called “Standard Assets”. They were then moved to the Asset Store (where
they still live) but have been discontinued since Unity 2019. A new version has been
re-uploaded by Unity under the name “Starter Assets” and is the right way to go from Unity
2020 onwards.
Changing the Input System
The First Person Controller from the Starter Assets pack uses Unity’s new Input System.
Unity has changed the way you can read inputs (keyboards, joypads, touch screens…) at
least three times. All of these are sort-of incompatible with each other.

The new Input System, however, does not offer feature-parity with its predecessors and is
much more complex to setup. For this reason, I suggest changing the project settings to
enable both the old and new systems to work.

Go to Edit > Project Settings and select the Player tab. This refers to the Unity player (the
code that runs the game), not the player character.

Change the Active Input Handling* to Both. This might require a restart.
Import the FPS Controller
Once your level is created, you can import the FPS controller into your scene.
From the Project window, visit the folder
Assets/StarterAssets/FirstPersonController/Prefabs, and drag these three prefabs into
the Hierarchy window:
● MainCamera (and delete the default MainCamera)
● PlayerFollowCamera
● PlayerCapsule

Your Hierarchy will probably look like this:

The FPS controller uses its own camera, so you will need to delete the “Main Camera” game
that was already in your scene.

Then, you need to connect those prefabs togethers. Drag the PlayerCameraRoot game
object (child of PlayerCapsule) into the Follow slot of the PlayerFollowCamera game
object.
The FPS controller is using Cinemachine to control the movement of the main camera. That
is another popular package that Unity has created, which is often used for camera transitions
and cinematic sequences.

You might also like