Hi all,
I am trying to create a nice character movement system and I am employing the 8 direction behaviour (only using 4-directions) to do so.
How I have it working is when an arrow key is down, a boolean is set to true which moves the character in the corresponding direction. So "right arrow key down" sets "IsRight" to "True" and the player moves right.
The problem is when I am holding the right arrow key, then hold down the up arrow key (while still holding the right arrow key), the player just keeps moving right because this boolean was set first.
What I would like to do is only set the boolean of "most recent key down" to true as I think this will solve my problem. Is there a way to do this?
(By the way I have tried setting the boolean on key-pressed but I need to set it on key-down for several reasons.)