I have a sprite that faces 4 directions depending on input. This is all working well except for my keyboard input..
If I am pressing down-right at the same time on the keyboard and release both keys there is a moment where I am pressing only the right key. This creates a snapping of my sprite upon key release where now im suddenly facing right instead of down.
basically i would like to release both the x and y buttons at the same time but i dont have a good way of detecting this. its TOO sensitive.
pressed_vector.x = int(directions.right) - int(directions.left)
pressed_vector.y = int(directions.down) - int(directions.up)
dpad_vector = pressed_vector.normalized()
its the standard input code you see everywhere.
I have the player mapped to a virtual joystick, dpad etc and i dont have this issue because on release you're going to be releasing your x and y keys at the same time. not sure how to handle this with the keyboard.