I'm creating a game with gravity, which is working good at this moment. But I've got a small problem with movement and changing gravity.
For example when you move right, and then press the gravity key (g) you stop moving right after a second while you're in air. I want the player to be able to move left/right while in air and also when you hold right, hit gravity, it should be still moving right.
I know the problem is in the keyPressedUp code, but I cant seem to fix