Player: More than a capsule

Hal Brooks
2 min readSep 16, 2021

Objective: Change the player capsule into a man!

When creating a player, a capsule is the starting point. Name the capsule Player and tag it Player. Add a character controller, deleting the capsule collider, then create and add a C# Player script.

Player component setup.

Assign variables and grab the _controller suing GetComponent in void Start.

Variable assignment in the Player script.

The C# script controls horizontal movement on the z axis and allows the Player to jump, as shown below.

Movement code in Void Update on Player script.

Download and import a rigged human character asset, for example Man 01, from GameDevHQ Filebase. Create an empty game object, named Model, as a child of Player. Drag the Man_01 prefab into the Model, as shown below.

Player hierarchy structure.

The Man_01 will appear as a pink game object since it is a URP asset in a 3D project. From the Unity Edit menu select Render Pipeline > URP >Upgrade Project Materials to URP Materials. Man_01 will now render properly.

Player is now human.

Gone is the capsule and the Player now looks like a person.

--

--