So, if you press the "n" key then line 5 is performed.
Then, you'll check for "m", which isn't pressed. So, you'll execute line 12, because "m" wasn't pressed. If "n" was pressed, then line 12 is still executed. So then the rotation is set to the value specified on line 12. Which overwrites what happened at line 5.
What you probably want to do is have a else, so:
if (Input.GetKey ("n")) {
} else {
if (Input.GetKey("m")){
} else {
}
}
↧