casper18 Posted March 10, 2011 Share Posted March 10, 2011 function Update () var speed = 7.0; var rotateSpeed = 3.0; GetComponent(CharacterController); @script RequireComponent(CharacterController) { controller.SimpleMove(forward * curSpeed); } var controller : CharacterController = transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0); var forward = var curSpeed = speed * Input.GetAxis ("Vertical"); transform.TransformDirection(Vector3.forward); here is an example of codes for navigation .. can you complete the codes ? or debug it ? there's something missing in these codes .. thnx ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now