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

Sporadic mouse movement with MOUSE_MODE_CAPTURED #17288

Closed
Enhex opened this issue Mar 5, 2018 · 7 comments
Closed

Sporadic mouse movement with MOUSE_MODE_CAPTURED #17288

Enhex opened this issue Mar 5, 2018 · 7 comments

Comments

@Enhex
Copy link
Contributor

Enhex commented Mar 5, 2018

Godot version:
3.0.2

OS/device including version:
Windows 10 64-bit

Issue description:
Using MOUSE_MODE_CAPTURED causes the mouse to sporadically move, that is while moving the mouse at constant speed it seems that sometimes it will jump forward greater distance than before.
it's mostly visible when rotating around objects.

This makes first person control feel un-smooth and laggy, which makes MOUSE_MODE_CAPTURED unsuitable for it, while it's its main use case.

When trying other mouse modes or rotating with the arrow keys I didn't notice this problem.

Also this problem may require a keen eye to notice, and I don't know if it happens on other machines.

Video of the problem (when mouse is visible it's confined mode, when hidden it's captured mode):
2018-03-05 04-09-31.zip

Update:
I tested it a bit more and it seems that if I directly modify the camera's rotation, it happens, but if I use rotate_y() it doesn't. Which is a bit weird because it seems to be a combination of modifying rotation and using MOUSE_MODE_CAPTURED?

Might be related to this issue:
#14855

Steps to reproduce:
Try moving around a box mesh while looking at it, with MOUSE_MODE_CAPTURED on.

You can also alt-tab away, and alt-tab back to the game window, and the mouse will stay visible.
If you try to move the mouse at a constant speed you'll notice that the cursor sometimes jumps greater distance than usual.

Minimal reproduction project:
mouse_jitter.zip
Note: mouse2.gd uses rotate_y().

@Akira1San
Copy link

Yes i have the same issue in Win 8.1 64b. It seams, that its starts from Godot 2x series.

@Akira1San
Copy link

This issue really prevents from developing FPS/TPS games and even any games, that uses MOUSE_MODE_CAPTURED. It should really be fixed for 3.1.

@EzraT
Copy link

EzraT commented May 14, 2018

I can confirm this happens on Linux too. (Ubuntu Budgie 18.04 on Nvidia Driver version 390.48)
My character controller uses rotate_object_local to rotate the camera, and the same issues occur with MOUSE_MODE_CAPTURED enabled.
Same thing happens when I test Enhex's reproduction project.

Really hope this can indeed be fixed for 3.1, its a major eyesore.

@GlaDOSik
Copy link

I'm also having this kind of problem when strafing around object and keeping the aim at it. The camera jitters which makes the object in the center of screen very unstable looking. But I'm not sure if it's related only to MOUSE_MODE_CAPTURED. Tho without it, the problem is less noticable. Will try to create minimal project with example.

@Calinou
Copy link
Member

Calinou commented Jul 14, 2019

I can't reproduce this on commit 584ca0f on Linux using the given example project.

Perhaps this has been fixed by the introduction of the physics jitter fix and raw input?

@akien-mga
Copy link
Member

Assuming fixed in 3.1.

@akien-mga akien-mga added this to the 3.1 milestone Jul 15, 2019
@Enhex
Copy link
Contributor Author

Enhex commented Jul 15, 2019

Tested on Godot_v3.1.1-stable_win64 and the jitter is gone.

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

No branches or pull requests

7 participants