Jump to content

Codes for navigation


casper18
 Share

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...