Rotation use back instead of - forward

There is no need to use -Vector3.forward, just use Vector3.back, looks better and more logically :wink:

if (Input.GetKey(KeyCode.Q))
        {
            transform.Rotate(Vector3.forward * rotationSpeed);
        }
        else if (Input.GetKey(KeyCode.D))
        {
            transform.Rotate(Vector3.back * rotationSpeed);
1 Like

I saw .back from the Vector3 drop down list too. It does make more sense than ‘not forward’ from a readability standpoint :grinning:

I saw that too. If ApplyRotation then takes a Vector3 instead of a float, I think the whole thing is marginally clearer and a lot more flexible.

Privacy & Terms