Place Holder
Step 1: Obtain a 3d Character
First you will need a 3d character that is rigged for walking and standing.
I downloaded a character from Mixamo.
Make sure you download the FBX for Unity(.fbx)
https://www.mixamo.com/#/?page=1&type=Character


Step 2: Import Your Character.
a. Right click in the Assets window and click Import New Asset.
b. Choose your standing and walking animations to import them.

Step 3: Add Materials to Your Character.
a. Click the first animation you imported.
b. Go to to the Inspector window, click the Animation button.
c. And then check the box next to Loop Time.
d. Next click the Materials button.
e. Click Extract Textures and save. You can create folder in the save prompt to keep things organized.
f. Click Extract Materials and save.
g. Repeat steps a through f for your other animations.
*If you receive a popup window asking to fix Normal Map Setting, just click Fix Now.
*When you click away, you may be prompted to Save.



Step 4: Create an Animator Controller.
a. Right click in the Assets Window and create a new Animator Controller.

Step 5: Setup the Scene.
a. Create a plane for your character to walk on.
I added some cubes for some obstacles.
b. Drag the the walking animation into the Scene.

Step 6: Prepare Your Character for Game Play.
a. With your walking animation selected, got to the Inspector window to add the components below.
b. Click Add Component and add a Animator.
Click the symbol to the far right of Controller box to add the Animator Controller.
c. Click Add Component and add a Rigidbody.
d. Click Add Component and add a Box Collider.
You will need to adjust the Box Collider size so the bottom and the top align with your characters head and feet.
e. Click Add Component and add New Script.
Right click the 3 dots to the right of your newly added script box and click Edit Script. Add the code below.





using UnityEngine;
public class player_movement : MonoBehaviour
{
public float moveSpeed = 5;
public float turnSpeed = 60;
Animator animator;
void Start()
{
animator = GetComponent<Animator>();
}
void FixedUpdate()
{
float h = Input.GetAxis ("Horizontal") * turnSpeed * Time.deltaTime;
transform.Rotate (0, h, 0);
float v = Input.GetAxis ("Vertical") * moveSpeed * Time.deltaTime;
transform.Translate (0, 0, v);
if(h != 0.0000f || v != 0.0000f )
{
animator.SetFloat("speed", 2);
}else{
animator.SetFloat("speed", 0);
}
}
}
Step 7: Setup Animator Parameter.
a. Open the Animator window
b. Click the + symbol to add a new parameter.
c. Click Float.
d. Name the new parameter to speed.

Step 8: Setup Animator Transitions.
a. In the Animator window.
b. Drag you walking and standing animation into the Animator window.
c. Right click on standing animation, click Transition, and then click on the walking animation.
d. Now right click on walking animation, click Transition, and then click on the standing animation.



Step 9: Adjust Animator Properties.
a. Select the Transition triangle going from standing to walking to bring up the properties in the Inspector window.
b. Uncheck the Has Exit Time box.
c. Click the + symbol in the Conditions section.
d. Change the 0 to 1
e. Now select the Transition triangle going from walking to standing.
f. Uncheck the Has Exit Time box.
g. Click the + symbol in the Conditions section.
h. Change the 0 to 1
i. Change Greater to Less.


Step 10: Setup the Camera.
a. Select your character from the Scene menu.
b. Change the x and z positions to 0 in the Inspector window.
c. Select the Main Camera from the Scene menu.
d. Adjust the position and rotation to be behind the player. Check the Game tab to see if it looks correct.
e. Drag the Main Camera onto your player in the Scene menu.
f. Press Play!


