Hi, I have just asked a question about 3D fly through. Thank you very much for answering. I got the following scripts from the answer:
function FixedUpdate() {
// Calculate the move direction
moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
moveDirection = transform.TransformDirection(moveDirection);
moveDirection *= speed;
// Move the controller
var controller : CharacterController = GetComponent(CharacterController); controller.Move(moveDirection * Time.deltaTime);}
The scripts work well. However, I can only go left, right, forward and backward as I press the arrow keys. Can I also go up and down (i.e., in the y direction). How to do it? Many thanks.
The added keys work well. Thanks again!