I want my script to check for the player not holding any movement keys. However, I only want it to run this check once the player has started moving. In other words, I want the script to check when the player has stopped moving, without the if statement being made true before the player has started. I don’t even know where to begin with this. Thank you in advance for the help.
private bool hasMoved = false
void Update() {
if(hasMoved == false && player has pressed movement keys == true) {
hasMoved = true;
}
if(hasMoved == true && player is pressing movement keys == false) {
hasMoved = false;
}
}