Tutorial 1: Unity 3rd Person Character Controller in 1 Step
-
Author: Brian A. Ree
1: Introduction and Tutorial Goal
Hello and welcome to our second little Unity tutorial. This tutorial requires that you have that latest Unity software installed, at the time of this writing the current version
is 2017.3.0f3. If you're new to Unity or you've been away for a while you might want to brush up your skills a little bit. Below are some links to get you up to speed.
The main focus of this tutorial is to show you how to import a 3d character using the newer Ethan model. If you've followed the first tutorial congrats, you've got some cool stuff
accomplished. This tutorial shows you how to do something similar but with a Standard Assets prefab so it's only a few simple steps.
2: Getting Setup
You can either download the Unity project associated with this tutorial or you can download the project from tutorial 1. The project associated with this tutorial has all
the work already done, the project from tutorial 1 is missing the few steps we'll perform here.
First let's turn off Robot Kyle if he's not already inactive. Select Kyle in the Hierarchy window and find his label in the Inspector window, uncheck the checkbox next to the Robot Kyle
label at the top of the Inspector window. The entry in the Hierarchy window should look faded just a bit now. Next expand the 'Standard Assets' folder, then the 'Characters' folder in your
'Project' window. See if you can find the 'ThirdPersonController' prefab and drag into onto your Hierarchy window. Let's break the prefab instance, go to the 'Game Object' menu and find the
'Break Prefab Instance' option, click it. The label for the 'ThirdPersonController' in the Hierarchy window should now be black instead of blue.
3: Last Little Bit
Now expand the 'Robot Kyle' Game Object in the Hierarchy window and select the 'Main Camera', copy the camera and paste is as a child object on the 'ThirdPersonController' Game Object that
we just added to the Hierarchy window. We have two camera's now which is a no no, but since Robot Kyle is inactive he's no longer really a part of the scene during run time.
Now Ethan has a camera to follow him around. Press play and run the scene. You can navigate with Ethan the same way you navigated with Robot Kyle, hit space bar to jump.
So the thing to notice here is that Ethan is essentially being animated the same exact way that Robot Kyle from the first tutorial is. If you deactivate 'ThirdPersonController' (Ethan) and
reactivate 'Robot Kyle' then run the scene you'll see what I mean. This is an example of how the animation system abstracts the character's animations to the rigging, allowing us to easily
apply humanoid animations to other 3d humanoid characters, almost automatically. Hope this was a good addition to the first tutorial and pointed out a few things. Till next time.