Skip to content

Quick bugfix to Flycontrols #406

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dcsturman
Copy link

@dcsturman dcsturman commented Feb 14, 2025

First, I'll 100% admit I don't fully understand this code (apologies). However, repeated bug under use of Flycontrols with dragToLook = true, that it would get "stuck" as if the mouse was always down. This happened with some condition where mouseStatus ended up > 1 and never got back to 0.

This two line fix seems to fix it. Been testing it locally and works well.

Feedback welcome!

Why

Small but very annoying bug in Flycontrols where after extensive use, the mouse gets "stuck" as if down. This only happens with dragToLook=true.

Note - feeling like a dolt but could not find CONTRIBUTING.md!

What

Two line fix - rather than increment/decrement mouseStatus, just set to 0 or 1. This avoids mouseStatus becoming > 1 and then never decrementing back to 0.

Checklist

  • Documentation updated - N/A - its a bug
  • Storybook entry added - N/A - its a bug
  • Ready to be merged - Given I don't know this code would like a review before saying ready to be merged.

First, I'll 100% admit I don't fully understand this code (apologies).
However, repeated bug under use of Flycontrols with dragToLook = true, that it would get "stuck" as if the mouse was always down.  This happened with some condition where mouseStatus ended up > 1 and never got back to 0.

This two line fix seems to fix it. Been testing it locally and works well.

Feedback welcome!
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@dcsturman
Copy link
Author

@CodyJasonBennett Sorry for the random ping but I was hoping you could let me know how to get someone to take a look at this PR (saw you were in this repo not so long ago).

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

Successfully merging this pull request may close these issues.

1 participant