Separate X and Y mouse sensitivity

Moderator: GZDoom Developers

User avatar
mjr4077au
Posts: 716
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Separate X and Y mouse sensitivity

Post by mjr4077au »

Where was the sensitivity of 2:2 done for Raze? I'm dashing off to work but from what I recall, in GetMouseDelta (and excluding Raze's specific divisors for angle (16.f / 32.f) and horizon (16.f / 64.f)), given an axis input of 1 with the / 3.f divisor on the x axis would have yielded a (4/3):1 ratio.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47968
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Separate X and Y mouse sensitivity

Post by Graf Zahl »

Nowhere. That's the point. It took the prescaled values from the backend and passed them on - so the factors were baked right into the conversion math in InputState::GetMouseDelta, so I had to change those factors to account for a different default.
User avatar
mjr4077au
Posts: 716
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Separate X and Y mouse sensitivity

Post by mjr4077au »

Ah right OK, I think I misread your previous post sorry :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47968
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Separate X and Y mouse sensitivity

Post by Graf Zahl »

Just pushed it. I'll leave the final tweaking of the factors to you,
User avatar
mjr4077au
Posts: 716
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Separate X and Y mouse sensitivity

Post by mjr4077au »

Thanks, I'll have a good play when I get home. Just built on my laptop (only have touchpad) but the horizon is pretty fast (comparatively) at the moment. I'm fairly used to the slow pitch given the old 4:1 pre-scaling code though.
User avatar
mjr4077au
Posts: 716
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Separate X and Y mouse sensitivity

Post by mjr4077au »

Curious, but you mentioned your mouse sensitivity was basically 1.7:1.7, is that how you played Raze before the uplift as well?

I know this is completely subjective, but with the x axis being matched to the y axis it feels terrible. Surely you'd want to turn quicker than you'd want to be able to look up/down? Again I only have the touchpad on me but I'm finding I'm boosting the x axis sensitivity up from 2.0 to 6.0 just to make it feel what I think is appropriate.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47968
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Separate X and Y mouse sensitivity

Post by Graf Zahl »

Actually, I played that last build of Raze with 2:1.4. Anything more on the x-axis and turning is so fast I can't control the game anymore.

The results here should be the same.

The constant factor in the old code was 1/6, all other scalers were 1 for me and the backend prescaled by 4, resulting in 4/6 = 2/3.
The new code omits the prescale, defaults to a sensitivity scale of 2 and multiplies by 1/3 so the end result would also be 2/3.

So why is it different? Or are you talking about Linux?
User avatar
mjr4077au
Posts: 716
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Separate X and Y mouse sensitivity

Post by mjr4077au »

This is on Windows and again it's just with the touch pad. I'm just going to leave it for now because I'm not on my proper gear but the horizon (I'll call it pitch since we convert it to pitch anyway) just felt a lot quicker than the angle.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47968
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Separate X and Y mouse sensitivity

Post by Graf Zahl »

Yeah, it was too fast for me, too, that's why I ended up using 1.4 for it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47968
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Separate X and Y mouse sensitivity

Post by Graf Zahl »

'So, how does it look? Everything ok with Raze?
User avatar
mjr4077au
Posts: 716
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Separate X and Y mouse sensitivity

Post by mjr4077au »

I'll be home in 1.5 hours, I live 80km from the office and public transport in Australia sucks lol
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47968
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Separate X and Y mouse sensitivity

Post by Graf Zahl »

I feel your pain. I have a 47 km way to work but there's no public transport options between my home town and my work place. With the car it takes 45-50 minutes, if I had to rely on public transport, I'd need 2 hours for that distance. :?
User avatar
Marisa the Magician
 
 
Posts: 3802
Joined: Fri Feb 08, 2008 9:15 am
Discord: Marisa the Magician#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Separate X and Y mouse sensitivity

Post by Marisa the Magician »

Oh, this is much nicer after the latest commits.
User avatar
mjr4077au
Posts: 716
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Separate X and Y mouse sensitivity

Post by mjr4077au »

Graf Zahl wrote:I feel your pain. I have a 47 km way to work but there's no public transport options between my home town and my work place. With the car it takes 45-50 minutes, if I had to rely on public transport, I'd need 2 hours for that distance. :?
I'd normally drive but I have a lead foot and unfortunately have a suspension until January. Just have to do what I have to do. Door to door is about 2 hours though, I'm already half way there which is why it's only another hour.

Preliminary opinion is I'll find the angle too slow out of the box compared to the pitch but will make a conscientious effort to not let personal bias overrule anything. It's been 4:1 for a long time though. I'm also in favour of replacing mouse_sensitivityx/y with an overall sensitivity slider that used to be there since m_yaw/m_pitch effectively do the same thing, just later in the piece.
Marisa Kirisame wrote:Oh, this is much nicer after the latest commits.
Can't wait to have a proper test 😁
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47968
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Separate X and Y mouse sensitivity

Post by Graf Zahl »

mjr4077au wrote:since m_yaw/m_pitch effectively do the same thing, just later in the piece.

Not quite. The difference is that one scales the raw event which will can be intercepted by scripts in GZDoom while the other one scales how this value gets applied to that control. So considering that apparently the values being passed through here can differ quite a bit a sensitivity scale on the event level is needed.

Return to “Closed Feature Suggestions”