A single keypress turns the user a significant amount on macOS
Closed this issue · 3 comments
When playing OpenTESArena on macOS, a single keypress of the A
or D
keys (on a Qwerty keyboard) to turn left or right respectively results in the user turning 25 degrees or so in that direction. Four quick keypresses turns me slightly over 90 degrees. This is a really strong turning radius, and makes it difficult to move around.
If I'm playing the game normally, I'm usually walking around like a drunken idiot. I hold the W
key to go forward, then hold D
to go right, but turn more than intended and then have to switch to A
to go compensate, and then sometimes I wind up overcompensating.
I do not see any strange behavior when typing in my character's name, so at least that is working correctly.
I'd be interested to know if this is the experience that other Mac users have.
This is strange behavior that may be caused by how SDL handles key states on macOS. If text input is working fine, then the issue is probably related to this code: https://github.com/afritz1/OpenTESArena/blob/master/OpenTESArena/src/Game/InputManager.cpp#L16
Maybe add some print statements here to see if the code is being called multiple times in a single frame, and/or to see if the delta time (dt
) has any anomalies when turning the camera. It's not an SDL event that can be fired multiple times each frame, so it's weird that this is happening in the first place.
I had a thought, although unlikely, that the problem might be because the horizontal sensitivity is too high in the options. I accidentally put the old value of 8.0 for H and V sensitivity in options-default.txt
in release 0.8.0, and have since reduced it to 5.0 so it more closely matches the original game.
Could you just try reducing the sensitivity in the Input section of the options and let me know if the problem is really this simple?
I guess I forgot to follow up on this.
@afritz1 Could you just try reducing the sensitivity in the Input section of the options and let me know if the problem is really this simple?
Yes, reducing it from 5.0
to 2.5
(in version 0.14.0) makes it so that (in classic input mode) it takes about 10 taps of the A
or D
keys to rotate 90 degrees instead of 4-5 at the default value of 5.0
. I don't know which version I originally found this, but while the default of 5.0
is still too fast for my personal liking, it does seem more playable now and less like a "drunken idiot" than it was in the past.
I'm considering this bug closed.