Rotation

Apologies if this is addressed later, but would it not be better for clarity to use (Vector3.back) instead of (-Vector3.forward)?

private void ProcessInput()
{
    if (Input.GetKey(KeyCode.Space)) // Can thrust while rotating
    {
        rigidBody.AddRelativeForce(Vector3.up);
    }

    if (Input.GetKey(KeyCode.A))
    {
        transform.Rotate(Vector3.forward);
    }
    else if (Input.GetKey(KeyCode.D))
    {
        transform.Rotate(Vector3.back);
    }
}
3 Likes

This was the way I thought of doing it myself seemed much more logical to me.

1 Like

Same, that is what I put in.
I didn’t bother changing it to -forward as Ben did.

1 Like

That’s what I did, too. I would guess Ben didn’t write it like this because it would require explaining explaining that Vector3.forward & Vector3.back are shorthand for writing axis values, and he wants to keep things simple at the moment.

1 Like

Privacy & Terms