Skip to content
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

Player continues walking in one direction even when arrow key is released #13

Open
nmadadair opened this issue Sep 26, 2022 · 6 comments

Comments

@nmadadair
Copy link
Contributor

nmadadair commented Sep 26, 2022

When walking the player into a collision (around edge of Catacombs and around trees outside in the Academy grounds map), at a certain point the player moves on their own even after the arrow key is released. Eventually this stops and goes back to normal.

See screen record for more: This video shows the player walking downwards into the wall of the Catacombs when no arrow keys are currently being pressed. When I move the player to the left using the left arrow key, the player walks to the left until the collision is out of the when and then continues down. In the open doorway, I have to press the up arrow to force the player to go against the "stuck" down direction. Eventually the stuck direction stops.

Screen.Recording.2022-09-26.at.4.17.29.PM.mov
@MarvelProgramming
Copy link
Contributor

Having trouble replicating this myself. Do you remember if anything else took place just before this bug occurred?

@nmadadair
Copy link
Contributor Author

@MarvJohnson Yes, I was doing something super specific. I had been checking for missing collisions in the map (or incorrectly layered tiles that would allow the player to walk over or under something incorrectly). When I was checking for the collision layers around the edges of the map (the trees outside or the walls in the Catacombs), I walked persistently, by pressing the arrow keys over and over or holding them down in one direction, into the edges of the map. Eventually the player began to move on its own in that direction. That being said, I'm also struggling to reproduce in the same locations.

@nmadadair
Copy link
Contributor Author

@kerrielake and I experienced this recently when testing in one of the API maps

@MarvelProgramming
Copy link
Contributor

@kerrielake and I experienced this recently when testing in one of the API maps

I've been experimenting with this as a bit, and the closest I've gotten to reproducing it is by holding the "command" key after letting go of any movement key (e.g. walking in any direction, then holding down the "command" key, then letting go of the "w", "a", "s", and/or "d" key(s)). It takes a lot of finagling, but with enough of that I can get the player character to continue moving in some direction without doing it myself. Still not entirely sure what the deal is there, though

@kerrielake
Copy link
Contributor

It happened to me again today when I was still holding down the directional buttons while trying to press "Help" to open dev tools

@MarvelProgramming
Copy link
Contributor

Looks like this can happen if you hold down a movement key, move focus outside of the game window while it's still accepting input (e.g. clicking on any of the window menu options, using command tab, etc), letting go of all movement keys, and giving focus back to the game window. I'll leave some video examples here for the record!

player-forced-movement-example1.mov
player-forced-movement-example2.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants