Hey. I just started using Unity and when I typed in mono development, an error keeps on popping up. The command I typed in was,
1 #pragma strict
2
3 var rotationSpeed = 100;
4
5 function Update ()
6 {
7 var rotaton : float = Input.GetAxis (“Horizontal”) * rotationSpeed;
8 rotation *= Time.deltaTime;
9 rigidbody.AddRelativeTorque (Vector3.back * rotation);
10 }
And when I go back to play the action in Unity, the errors
Assets/BallControlls.js(8,9): BCE0005: Unknown identifier: ‘rotation’
Assets/BallControls.js(9,19): BCE0019: ‘AddRelativeTorque’ is not a member of ‘UnityEngine.Component’.
pops up and I can’t find a way to fix it.