I have a movement code for my charactor but when you change the direction you are walking I want the way the charactor is facing to change and match.
var speed = 3.0;
var JumpSpeed : float = 100.0f;
var gravity = 20.0;
function Update () {
var controller : CharacterController = GetComponent(CharacterController);
var forward = transform.TransformDirection(Vector3.right);
var curSpeed = speed * Input.GetAxis ("Horizontal");
controller.SimpleMove(forward * curSpeed);
}