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

[BUG] Camera Moving Bug #127

Open
1 task done
KaDraken opened this issue Aug 21, 2022 · 1 comment
Open
1 task done

[BUG] Camera Moving Bug #127

KaDraken opened this issue Aug 21, 2022 · 1 comment
Labels
bug Something isn't working low priority

Comments

@KaDraken
Copy link

KaDraken commented Aug 21, 2022

  • I am using the latest version of the exporter

Bug description

While exporting the area if you move the camera while it is still exporting, the camera will move into any direction without any inputs.

Steps to reproduce

1.Hold down any WASD Key to move the camera
2.Click on Export while still holding down one of the WASD Key input

The current behavior

Cameramovingbug.mp4

The expected behavior

When moving the camera and hitting the export button, the camera should stop moving instead of moving on its own without any inputs. Though it's not a serious bug since if you move the camera a bit it'll stop drifting on its own.
@KaDraken KaDraken added the bug Something isn't working label Aug 21, 2022
@KaDraken KaDraken changed the title [BUG] Camera Moving Bug Aug 21, 2022
@KaDraken KaDraken changed the title Camera Moving Bug [BUG] Camera Moving Bug Aug 21, 2022
@ScoreUnder
Copy link
Collaborator

ScoreUnder commented Aug 22, 2022

FWIW you'll see this behaviour in nearly every game out there, if you leave the window without releasing a key. (e.g. clicking on another window while the key is held) That's not to say it can't be solved :) just that it's a well-known issue in input handling.

The root cause is that the OS sends the "key pressed" signal to that window, but since something else is in focus when the key is released, it only sends the "key released" signal to that other window, so the first window doesn't know that the key has been released and continues to act as if it is held down.

A reasonable workaround in the code could be to clear key states in the input handler when the main window loses focus.

A workaround from the user's perspective is to hit the offending key so that the OS sends a (press and) release signal to the window for that key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority
Projects
None yet
Development

No branches or pull requests

3 participants