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

Fix mouse movement not working at certain distances and angles #32

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

LumpBloom7
Copy link
Collaborator

@LumpBloom7 LumpBloom7 commented Mar 17, 2020

Fixes #29

I found the cause to be as follows:
OnMouseMove only updates when the cursor is within the drawable boundaries of DefaultCursor. This is in theory not an issue as the dimensions of DefaultCursor is equal to the entire screen.
However DefaultCursor rotates itself based on the position of the absolute cursor, causing gaps within the screen which counts as being out of bounds.
image

An override has been made to always assume that the cursor is within bounds.

@LumpBloom7
Copy link
Collaborator Author

I have tested this with various ridiculous screen dimensions and scaling options, and have confirmed that it works in all cases.

@mouzedrift
Copy link

Can confirm 👍

@naoei naoei merged commit 120c775 into taulazer:master Mar 17, 2020
@LumpBloom7 LumpBloom7 deleted the FixMouseInput branch March 18, 2020 07:10
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.

The paddle doesn't rotate correctly when the mouse is too far away from the center of the screen
3 participants