I am workng with this script
var controller : CharacterController = GetComponent(CharacterController);
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis ("Vertical");
transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 8);
controller.SimpleMove(forward * curSpeed);
It works by rotating the player with the left and right arrows, and actually moving the character forward/backwards with the veritcal keys. How do I manipulate THIS script to make the character walk AND face a direction with the left and right keys just like the forward and backward keys?
I've tried making a 2nd curSpeed var:
var curSpeed2 = speed*(Input.GetAxis("Horizontal");
but I am lost when it comes to plugging that in to the rest of the code...
controller.SimpleMove(forward * curSpeed + curSpeed2);
doesn't work.
Any help is appreciated!