3rd Person Character Controller

Alright, Here is the updated character controller video.

3rd preson tutorial from Rebecca Kramp on Vimeo.

This is the older tutorial video. Still works but with a different script

Untitled from Rebecca Kramp on Vimeo.

Thanks to Seth Kendell for providing the written tutorial below: A video will be available soon as well.

Part 1 – Static characters/objects with looping idle animation
1.       In 3ds Max, make sure your timeline encapsulates your entire looping animation.  Write down the time range and set aside.
2.       In 3ds Max, click File > Export.  Select FBX as format and chose file location and name.  Pick a directory inside your Unity project folder, so Unity will recognize it.
3.       In FBX export options, make sure the following settings are selected:
a.       Geometry > Smoothing Groups and Convert Deforming Dummies to Bones are checked.
b.      Animation > Animation is checked
c.                  Animation > Bake Animation > Bake Animation is checked
d.      Embed Media > Embed Media is checked
e.      FBX File Format > FBX 2006 is selected
f.                   Click OK. 
g.       Ignore Warnings that come up.  If there is a problem with the way your character displays in Unity, go back and look at these Warnings for a clue.
4.       Open your Unity scene.
5.       Drag character/object from your project window into the viewport for placement.
6.       If your character shows up too big or small, select the asset in the Project Window, and adjust Scale Factor in the Inspector.  Hit Apply at the bottom of the Inspector.

7.       Once the scale looks good, select the character again in the Project Window, and click the little “+” button on the right side in the animations section.   Set the Start and End of your idle” animation to match your written down 3ds Max frame range.  Change WrapMode to Loop.
8.       Hit “Play,” to test.  Your character/object should now be in the scene looping its idle animation!

Part 2 – Creating interactive player characters with multiple animation sequences
1.       In 3ds Max, create your different animation sequences within one file at different points in the timeline.  Set the start of each of your animations on even hundreds, so you have some room to make changes when needed.
2.       When you are finished with one animation, “bracket” the clip, by setting a keyframe on all controls for the first and last frame, as well as the immediately surrounding frames.
3.       When ready to export, set your timeline range to include ALL of your animations.
4.       Repeat steps 2 through 7 from Part 1 above.
5.       Make sure to hit the “+” icon multiple times to add multiple animations. 
6.       NOTE:  In order for the scripting to work, you can ONLY name your animations from the following list (case sensitive): idle, run, walk, walkbackwards, jump.  You do not need all of these animations, but those that you have must be named one of those names.
7.       Select player character from Hierarchy window.
8.       Add a Character Controller by choosing from the top menus Component > Physics > Character Controller.


With your character selected, adjust the Character Controller parameters in the Inspector using the capsule-like gizmo in the viewport as a guide.

10.   Go to our class homepage on Powercampus, and from Course Documents, download the scripts package.  Unzip it, and place the three script files in your Unity project directory under Scripts.

11.   In Unity, drag S_MoveScript from your Project Window onto your player character in your Hierarchy window.

12.   Now drag SethCrossfade from your Project Window onto your player character in your Hierarchy window.  The order counts here.

13.   If you would not like the character to toggle between walking and running when you tap the Shift button, uncheck Toggle Walk Run in both S_MoveScript and S_Crossfade from the Inspector.  Other options to modify include Run Speed and Walk Speed (maintain a 2 to 1 ratio between these if possible), and blend values for each animation transition.  The blend_idle adjusts the amount of time (in seconds) the game will take to blend into the idle.  The blend_run, adjusts the blend into the run, and so on.  Values of 0.1 to 0.3 are recommended for run/idle.  Values of 0.1 to 0.5 are recommended for walk and jump.  Test out to find a number that looks good to you.
14.   Position main camera behind the player, and hit Play to test out the character.

Part 3 – Creating 3rd Person Camera
1.       Drag smooth follow/ custom camera script from your Project window onto your Main Camera in the Hierarchy window.
2.       Select your player in the Hierarchy window.
3.       From the top menus, create a new “empty” by selecting GameObject > Create Empty.  An Empty is like a null, locator, or dummy in other programs, only with no visible form.  It is simply an invisible point with a location. 
4.       Once created, place in viewport directly above your character, aligned near its top.  Name the Empty something like CameraTarget, and drag it onto your player in the Hierarchy window.
5.       Select Main Camera from your Hierarchy.
6.       In the Inspector options for the Camera Script, click the little circle to the right of the Target field, and select your CameraTarget empty.
7.       Adjust other fields to your liking, testing by hitting play in between.  Especially look at Target Height, Distance (default distance from player), Max Distance, and Min Distance.

Part 4 – Creating a Blob Shadow
1.       In your Project window, expand the Projectors Folder.
2.       Drag Blob Shadow Projector from the Project window onto your player in the Hierarchy window.
3.       In the viewport, move blob shadow up above the character, aiming down.
4.       In the Inspector, change the Far Clip Plane, to something smaller, like 5.  Check on Orthographic Size, and drag the Orthographic Size down to something smaller.  Use the viewport as a guide. 
5.       Drag the entire Blob Shadow up or down again to adjust the strength of the shadow.
6.       At the top right of the screen, click the Layers drop down menu, and select Edit Layers…
7.       Rename the first available User Layer to “Ignore Blob Shadow.”
8.       Select your player in the Hierarchy view.
9.       Near the top of the Inspector (under the check box for Static), open the Layer drop down menu, and select Ignore Blob Shadow from the list.  When the dialogue box comes up, click Yes, Change Children.
10.   Select the Blob Shadow Projector inside your player in the Hierarchy window.
11.   In the Inspector, where it says Ignore Layers, select Ignore Blob Shadow.