I might have a slight perfectionist problem and it bothered me that ‘A’ was taking precedence in the code, so I thought of a fairly simple way to prevent that from happening.
if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.D) == false) { print("Rotating Left"); } else if (Input.GetKey(KeyCode.D) && Input.GetKey(KeyCode.A) == false) { print("Rotating Right"); }
This way you don’t really add a single line of code, but provide a smoother experience to the player (I’m not sure how many people would actually get frustrated over the precedence thing tbh though)