-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagonal movements are odd #10
Comments
It seems like if you press up + left at the exact same time, the horizontal and vertical velocity will be the same. If you input e.g. up slightly later, then the horizontal speed will be way larger than the vertical one. I think you might want to keep the current speed when a vertical direction button is pressed in addition to a horizontal one, and simply change direction. |
Fixed it. |
@wirekang I'm not sure if I should open a new issue for this, but even in 2.0 there are some odd things going on with multiple simultaneous direction presses. Take the following scenario:
Pushing opposite directions on a keyboard can happen fairly easily when switching directions, even if only for a brief amount of time. What seems like a straightforward way to fix this is to have opposite directions cancel each other out: if you're pressing up and down at the same time, it should be as if you were pushing neither; and so on. |
The text was updated successfully, but these errors were encountered: