Need help getting my character to move

Hi there, I'm PaulX1, and I am new to Unity, and need some help.

I've followed this tutorial on Unitylabs.net and I have reached the 4th page, but I'm quite literally stuck. My character will fall to the ground, and then will no longer be able to move. He can animate, and turn around, but that's about it. I've adjusted the Character controller size and location, but there's no change.

I created a sphere and tested the code on that, and it appears to move properly, so could it be the animations themselves that are the problem? I think everything is lined up properly, but I may be wrong.

I've noticed that when I do this //moveDirection = transform.TransformDirection(moveDirection);, the character can move in a straight line, even animating properly, but will not go left or right. And as far as I can tell I am not getting any error messages, so it's possible it's a geometry problem, but everything is nearly completely lined up, so I don't know what it could be.

Here's the source file link. I'm not sure what's wrong, but if there's something I'm missing, please let me know. Thanks in advance.

private var walkSpeed : float = 1.0;
private var gravity = 100.0;
private var moveDirection : Vector3 = Vector3.zero;
private var charController : CharacterController;

function Start()
{
    charController = GetComponent(CharacterController);
    animation.wrapMode = WrapMode.Loop;
}

function Update ()
{
    if(charController.isGrounded == true)
    {
        if(Input.GetAxis("Vertical") > .1)
        {
            if(Input.GetButton("Run"))
            {
                animation.CrossFade("run");
                walkSpeed = 4;
            }
            else
            {
                animation["walk"].speed = 1;
                animation.CrossFade("walk");
                walkSpeed = 1;
            }
        }
        else if(Input.GetAxis("Vertical") < -.1)
        {
            animation["walk"].speed = -1;
            animation.CrossFade("walk");
            walkSpeed = 1;
        }
        else
        {
            animation.CrossFade("idle");
        }

        // Create an animation cycle for when the character is turning on the spot
        if(Input.GetAxis("Horizontal") && !Input.GetAxis("Vertical"))
        {
            animation.CrossFade("walk");
        }

        transform.eulerAngles.y += Input.GetAxis("Horizontal");

        // Calculate the movement direction (forward motion)
        moveDirection = Vector3(0,0, Input.GetAxis("Vertical"));
        moveDirection = transform.TransformDirection(moveDirection);

    }

    moveDirection.y -= gravity * Time.deltaTime;
    charController.Move(moveDirection * (Time.deltaTime * walkSpeed));
}

The answer is that the axis of the character is different than that of the sphere, which is aligned to Unity's default axis settings. By default, X is sideways, Y is up, and Z is forwards, while the default settings for Biped in 3D Studio MAX 7 is X is sideways, Y is forwards and Z is up, meaning that this code is attempting to make the character move upwards instead of forward. So, instead of this

moveDirection = Vector3(0,0, Input.GetAxis("Vertical"));

It's instead this

moveDirection = Vector3(0,-Input.GetAxis("Vertical"),0);

The next question I have is, is there a way to change the axis of the character in Unity? I tried to change it in MAX and the whole character moved.

Hi, I have FXB exporter version 2009.4, (in Max, during export) look under axis conversion (up axis) and change that, hope it helps ;)