top of page

QuickStart: Character Controllers

USING THE UNITY STARTER ASSETS - THIRD PERSON CHARACTER CONTROLLER

Using Unity Version 2021.3


This tutorial will show you how to easily use Unity's free Third Person Character Controller with a character prefab from the Modular Character series (or any character, really). It's available for free on the Unity Asset Store here.



There are some important things to note before you get started. First, the updated Starter Assets packages from Unity are compatible with Unity 2020.3 LTS and 2021.3 LTS. Additionally, these packages require Unity's new Input System and Cinemachine to work. The installation instructions state that these two packages will install when you import the Third Person Character Controller package, but it's probably best to install them first.


Now let's talk about some best practices when adding a character controller to a character.

  • Create an Empty Parent to hold Control Logic It's a good idea to create a new empty parent for the character prefab which will hold all of the control components, including colliders. This is particularly useful with the Modular Character series, because height is adjusted dynamically according to shoe type. If the collider lives on a parent object, rather than the character prefab, you don't need to worry about updating it.

  • Spend Some Time on Animations Even if you plan to use animation packs as a starting point, rather than your own, spend some time refining them so they look as compatible as possible with your character.

  • Decide What Kind of Control You Want The Unity package we're talking about today makes use of the Character Controller component, which does not make use of physics at all. Other controllers (or your own) may use a Rigidbody. They both come with benefits and drawbacks, but you will see different results depending on your needs. This article does a good job of comparing the two.


Getting Started

Before we can get started, you need to install the package. As always, I recommend doing so in a clean project.


If you haven't already, go to the Asset Store and add the asset to your assets.



Go back to Unity, open the Package Manager (Window > Package Manager) and select "Packages: My Assets" from the dropdown (it will usually default to "Packages: Unity Registry" when you first open it). Now search for the "Starter Assets - Third Person Character Controller" package, download it and import it into your project.


It will likely prompt you to accept the new Input System. Say yes.


Open the "Playground" scene (Assets > StarterAssets > ThirdPersonController > Scenes). It already contains a character prefab. We're going to swap in our own.


Step One:

Unpack the Player Armature prefab and delete the Geometry and Skeleton children.



Step Two:

Find your character prefab, pull it into the scene hierarchy.



Step Three:

Unpack your character prefab and delete the Animator component (if it has one).



Step Four:

Parent your character to the Player Armature gameobject and swap your characters' avatar into the Animator component.



Step Five:

That's it! Run the scene and watch your character move according to your inputs.



 

Quick Resources

Used in this article:









Looking for a character? Check out some of mine, available on the Asset Store:






559 views0 comments

Recent Posts

See All

Comments


bottom of page