Configuring a player controller
So, far we have taken a lot of time to shape our world and populate it with cherry trees and spawn points, and prepare it for cucumber patches. We have been creating the game world for our player character, the Cucumber Man, to exist in. It is now time to add our Cucumber Man to our game.
Here are the steps to add the Cucumber Man to our game and to configure the controller:
- In the
Project
panel, selectPrefabs
. - Drag the
CucumberMan
prefab to theHierarchy
panel. Use the following screenshot as a reference to ensure that you are dragging the highlighted prefab illustrated in the following screenshot. Note that the subordinateCucumbor_Man
has been intentionally misspelled to help ensure theCucumberMan
prefab is used:
- In the
Hierarchy
panel, selectMain Camera
. - With the
Main Camera
selected, click theAdd Component
button in theInspector
panel. - Select
Scripts | Camera Follower
to add theCamera Follower
script to theMain Camera
. - In the
Camera Follower
component...