Because of the if/elseif/else
logic for rotation, if you start by pressing A, keep it pressed while pressing D, then release A, you will get into the right rotation block without passing through the else
case, so you will end up with both side boosters running until you release both A and D.
The correct approach should instead be:
private void ProcessRotation() {
if (Input.GetKey(KeyCode.A)) {
RotateLeft();
}
else {
StopRotatingLeft();
if (Input.GetKey(KeyCode.D)) {
RotateRight();
}
else {
StopRotatingRight();
}
}
}
This still has the issue that it gives priority to a key over another (A over D), so it would probably be best to keep a state of the key that is already pressed, and continue rotating in that direction until it’s released, before taking into account the other key.