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 look jitter (partially) #394

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Fix mouse look jitter (partially) #394

merged 1 commit into from
Jan 3, 2024

Conversation

toberge
Copy link
Contributor

@toberge toberge commented Dec 31, 2023

Time.deltaTime should not be used for mouse delta since it already is a delta of pixels moved across the screen. Dampening mouse input by two orders of magnitude seems to work well for this input.

Background: I'm working on the game from a laptop where only the integrated graphics work, and with low framerate the current mouse input handling showed glaring faults, jittering painfully when I tried to aim (especially with ironsights).

@toberge toberge requested a review from Fueredoriku December 31, 2023 17:40
Copy link
Contributor

@Fueredoriku Fueredoriku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you set the mouse lookspeed to 0.0015 instead? After some testing I found this value to feel less "sluggish", as I find the mouselook speed here a bit too slow

Time.deltaTime should not be used for mouse delta since it already is a
delta of pixels moved across the screen. Dampening mouse input by two
orders of magnitude seems to work well for this input.
@toberge toberge force-pushed the fix/mouse-look-jittering branch from 139c0a0 to 2eafa48 Compare January 2, 2024 16:57
@toberge
Copy link
Contributor Author

toberge commented Jan 2, 2024

Could you set the mouse lookspeed to 0.0015 instead? After some testing I found this value to feel less "sluggish", as I find the mouselook speed here a bit too slow

Done. And by the way, I think we could benefit from using separate zoomed-in look speeds for mouse and gamepad, as the current zoomed-in sensitivity seems fine on gamepad and too sensitive with a mouse (though that may be subjective ofc ofc)

@toberge toberge requested a review from Fueredoriku January 2, 2024 17:01
Copy link
Contributor

@Fueredoriku Fueredoriku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could benefit from using separate zoomed-in look speeds for mouse and gamepad, as the current zoomed-in sensitivity seems fine on gamepad and too sensitive with a mouse

I think we can throw it in as a subtask in #383, as that would be nice for players to tune themselves too for the sake of personal prefferences

@toberge toberge changed the title Fix mouse look jitter Fix mouse look jitter (partially) Jan 3, 2024
@toberge
Copy link
Contributor Author

toberge commented Jan 3, 2024

I do notice that the jitter is still present on my end, so we may need to do some actual smoothing of the inputs here later

@toberge toberge merged commit 22b1057 into dev Jan 3, 2024
1 check passed
@toberge toberge deleted the fix/mouse-look-jittering branch January 3, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 🎉
Development

Successfully merging this pull request may close these issues.

2 participants