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 bad mouse offset with Control::wrap_mouse() #55706

Merged

Conversation

jmb462
Copy link
Contributor

@jmb462 jmb462 commented Dec 7, 2021

Fix #55705

Issue description

Right click in the 3D viewport capture the mouse for free look.
After releasing the mouse button, mouse cursor is wrapped at a bad position.

Identified cause

get_screen_transform() need to be reverted to get_global_transform() in Control::warp_mouse() function.
I've added this changed to my PR about popup offset when including Gil's PR changes but it seems it was a bad idea.

Before

bug

After

fix_warp_mouse

@jmb462 jmb462 requested a review from a team as a code owner December 7, 2021 20:10
@YeldhamDev YeldhamDev added this to the 4.0 milestone Dec 7, 2021
@akien-mga akien-mga merged commit ff118d7 into godotengine:master Dec 7, 2021
@akien-mga
Copy link
Member

Thanks!

@jmb462 jmb462 deleted the fix-bad-control-wrap_mouse-offset branch December 7, 2021 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad mouse offset after Control::wrap_mouse()
3 participants