3D Platform Controller Forward & Camera HELP!

I’m working on the controls for a 3D platformer. I’ve got most things I want so far in the controls, but I can’t figure out how to make the object face the direction I want, AND make it play right with a 3D camera, like the Camera Orbit. I realize that my script is custom made, but I’d rather keep it like this for better accessing later in development.

    #pragma strict
    #pragma implicit 
    #pragma downcast
    //OUTSIDE SCRIPT VARIABLES
    var canMove = true;
    var moveSpeed : float = 6.0;
    
    var canJump = true;
    var jumpHeight : float = 12.0;
    var gravity : float = 20.0;
    
    var canDoubleJump = true;
    var doubleHeight : float = 4.0;
    
    private var moveDirection : Vector3 = Vector3.zero;
    
    function Update(){
    	var controller : CharacterController = GetComponent(CharacterController);
    
    	//CONTROLS THE MOVEMENT
    	if(controller.isGrounded && canMove){
    		moveDirection = new Vector3(Input.GetAxis("Horizontal"),0,Input.GetAxis("Vertical"));
    		moveDirection = transform.TransformDirection(moveDirection);
    		moveDirection *= moveSpeed;
    		canDoubleJump = true;
    	//CONTROLS THE JUMP	
    	if(Input.GetButtonDown("Jump") && canJump){
    			moveDirection.y = jumpHeight;
    		}
    	}
    	//CONTROLS MOVEMENT IN AIR
    	if(!controller.isGrounded && canMove){
    		moveDirection.x = Input.GetAxis("Horizontal");
    		moveDirection.x *= moveSpeed + 3;
    		moveDirection.z = Input.GetAxis("Vertical");
    		moveDirection.z *= moveSpeed + 3;
    	}
    	//CONTROLS DOUBLE JUMPING	
    	if(!controller.isGrounded && canDoubleJump && canJump && Input.GetButtonDown("Jump")){
    			moveDirection.y = jumpHeight + doubleHeight;
    			canDoubleJump = false;
    		}
    	
    	moveDirection.y -= gravity * Time.deltaTime;
    	controller.Move(moveDirection * Time.deltaTime);
    }
    
    function OnTriggerStay(other : Collider){
    	//MOVING ON PLATFORMS
    	if(other.tag == "Platform"){
    		this.transform.parent = other.transform.parent;
    	}
    }
    function OnTriggerExit(other : Collider){
    	//MOVING OFF PLATFORMS
    	if(other.tag == "Platform"){
    		this.transform.parent = null;
    	}
    }
`
`

I suggest you “Third Person MMO Controller” for camera orbit. You can search at asset store.

Okay, I modified the script to this:

#pragma strict
#pragma implicit 
#pragma downcast
//OUTSIDE SCRIPT VARIABLES
var canMove = true;
var moveSpeed : float = 6.0;
var maxRotationSpeed : float = 360;

var canJump = true;
var jumpHeight : float = 12.0;
var padHeight : float = 25.0;
var gravity : float = 20.0;

var canDoubleJump = true;
var doubleHeight : float = 4.0;
private var canPad = true;
private var autoRotate : boolean = true;

private var moveDirection : Vector3 = Vector3.zero;

function Update(){
	var controller : CharacterController = GetComponent(CharacterController);

	//CONTROLS THE MOVEMENT
	if(controller.isGrounded && canMove){
		moveDirection = new Vector3(Input.GetAxis("Horizontal"),0,Input.GetAxis("Vertical"));
		directionVector = new Vector3(Input.GetAxis("Horizontal"),0,Input.GetAxis("Vertical"));
		moveDirection = transform.TransformDirection(moveDirection);
		moveDirection *= moveSpeed;

		canDoubleJump = true;
	if(directionVector != Vector3.zero){
		var directionLength = directionVector.magnitude;
 		directionVector = directionVector / directionLength;
 		directionLength = Mathf.Min(1, directionLength);
 		directionLength = directionLength * directionLength;
 		directionVector = directionVector * directionLength;
	}
	directionVector = Camera.main.transform.rotation * directionVector;
 	var camToCharacterSpace = Quaternion.FromToRotation(-Camera.main.transform.forward, transform.up);
 	directionVector = (camToCharacterSpace * directionVector);
	//CONTROLS THE JUMP	
	if(Input.GetButtonDown("Jump") && canJump){
			moveDirection.y = jumpHeight;
	}
	
 	if (autoRotate && directionVector.sqrMagnitude > 0.01) {
	var newForward : Vector3 = ConstantSlerp(
 	transform.forward,
 	directionVector,
 	maxRotationSpeed * Time.deltaTime
 	);
 	newForward = ProjectOntoPlane(newForward, transform.up);
 	transform.rotation = Quaternion.LookRotation(newForward, transform.up);

 	}
}
	//CONTROLS MOVEMENT IN AIR
	if(!controller.isGrounded && canMove){
		moveDirection.x = Input.GetAxis("Horizontal");
		moveDirection.x *= moveSpeed + 3;
		moveDirection.z = Input.GetAxis("Vertical");
		moveDirection.z *= moveSpeed + 3;
	}
	//CONTROLS DOUBLE JUMPING	
	if(!controller.isGrounded && canDoubleJump && canJump && Input.GetButtonDown("Jump")){
			moveDirection.y = jumpHeight + doubleHeight;
			canDoubleJump = false;
		}
	
	moveDirection.y -= gravity * Time.deltaTime;
	controller.Move(moveDirection * Time.deltaTime);
}

function ProjectOntoPlane (v : Vector3, normal : Vector3) {
return v - Vector3.Project(v, normal);
}

function ConstantSlerp (from : Vector3, to : Vector3, angle : float) {
var value : float = Mathf.Min(1, angle / Vector3.Angle(from, to));
return Vector3.Slerp(from, to, value);
}

function OnTriggerStay(other : Collider){
	//MOVING ON PLATFORMS
	if(other.tag == "Platform"){
		this.transform.parent = other.transform.parent;
	}
}

function OnTriggerEnter(other : Collider){
	//JUMP PAD//Works perfect with sphere colliders
	if(other.tag == "Jump Pad"){
		canDoubleJump = false;
		moveDirection.y = padHeight;
	}	
}
function OnTriggerExit(other : Collider){
	//MOVING OFF PLATFORMS
	if(other.tag == "Platform"){
		this.transform.parent = null;
	}
	if(other.tag == "Jump Pad"){
		canDoubleJump = true;	
	}
}

I have the Main Camera with a Mouse Orbit script…it’s close, but it still acts kinda weird. Any more help?