Just as Graham Dunnett ♦♦ stated.
add 3 more lines next to this:
var rotation : float = Input.GetAxis ("Vertical") * rotationSpeed;
rotation *= Time.deltaTime;
rigidbody.AddRelativeTorque (Vector3.back * rotation);
looking like this:
var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
rotation *= Time.deltaTime;
rigidbody.AddRelativeTorque (Vector3.left * rotation);
And by the way, you are moving on the Z axis with your W/S, and now will be able to move on the X with A/D. This is because Vector3.back stands for Vector3(0, 0, -1), which goes like (X, Y, Z). See [Vector3 Documentation][1] for more info.
[1]: https://docs.unity3d.com/Documentation/ScriptReference/Vector3.html
↧