What am I doing wrong?
this is my script:
var rotationSpeed = 100;
void Update () { var rotation , identifier = Input.GetAxis ("Horizantal") rotaionSpeed; rotation = Time.deltaTime; rigidbody.AddRelativeTorque (Vector3.back * rotation); }
I am receiving this error: Assets/Character.cs(5,7): error CS0116: A namespace can only contain types and namespace declarations
Please have a look at the "Learn" / scripting tutorial basics for C# - you need a class definition around this and ins$$anonymous$$d of "var rot..." you do "private rot.."
Your answer
Follow this Question
Related Questions
Object rotation as we see of the prefab in prefab window. 0 Answers
Grabbing object with mouse and placing/snapping it back to Original (indicated) Position 0 Answers
controlling objects with a character controlled by a nav mesh agent 0 Answers
lower object doesn't move upper one 0 Answers
My random script work incorrect! 0 Answers