Hi all, this is my 1st answer, and yes I'm new in unity, I'm still make a game where the player move just in X and Z direction, with arrow keys, my problem is: When I press up/down arrow and at same time I press left/right, nothing append, that's ok I want it move up/down, but when I press left/right and I press up/down it change, why? This is the code I put on fixedUpdate. I try also to invert the code, put left/right up on the code and unity invert the situation, but the problem is not solve.
I want who play need to release the key to start to move in a different direction, it's a puzzle game :D
I make an online version, this is just the prototype, use arrow and try :D http://www.williamjcrow.altervista.org/file/prova.html
Thanks in advanced
P.S. Sorry for my english, I'm not native ;)
Basically what happens is the fact that every update it checks if you press one of those buttons, because of the order and the else it will stop after the first if that returns true. up will go before down, before left, before right.
to solve this add
First wrong decision, the Input in the Update.
Input shoudl be in Update to be checked every frame. Long story short, FU happens at fixed rate, Update happens every frame and your input is generating by OS every frame. If your Update runs 100fps and your FU runs 60fps you have 405 chance your input may be missed.
Now to fix all that.
In this case you have to have a moment where all buttons are up. Is it what you are after?