Jumping is, Well....... Kind of Working?

var player : Transform;
private var controller : CharacterController;
var gravity : int;
var moveSpeed : int;
var jumpHight : int;

function Start () {

controller = player.GetComponent(CharacterController);
}

function Update () {

if(Input.GetAxis("D")) {

	controller.Move(Vector3.right * moveSpeed * Time.deltaTime);
}

if(Input.GetAxis("A")) {

	controller.Move(Vector3.right * -moveSpeed * Time.deltaTime);
}

if(controller.isGrounded  Input.GetButtonDown("Jump")) {

	controller.Move(Vector3.up * jumpHight * Time.deltaTime);
}
}

The player just like, moves up very quickly and goes back down. Doesn’t look good at all. What did I do wrong?

Well, for an easy answer, check out the docks on the character controller class and on the Move function. They have an example that shows how to move the controller and provide jumping.

Character Controller:
http://unity3d.com/support/documentation/ScriptReference/CharacterController.html

Character Controller Move function:
http://unity3d.com/support/documentation/ScriptReference/CharacterController.Move.html