1 #pragma strict
2
3 var rotationSpeed = 100;
4
5 function Update () {
6
7 var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
8 rotation *= Time.deltaTime;
9 GetComponent.()AddRelativeTorque(Vector3.back * rotation);
10
11}
↧