Skip to content

[Migrated to PR #676] Decouples Mouse Crosshair Speed [Aiming] from Mouse Speed [Camera]#620

Closed
AL2009man wants to merge 23 commits intofgsfdsfgs:portfrom
AL2009man:MouseCrosshairFix
Closed

[Migrated to PR #676] Decouples Mouse Crosshair Speed [Aiming] from Mouse Speed [Camera]#620
AL2009man wants to merge 23 commits intofgsfdsfgs:portfrom
AL2009man:MouseCrosshairFix

Conversation

@AL2009man
Copy link
Copy Markdown

@AL2009man AL2009man commented May 29, 2025

In the past, Mouse's Crosshair Speed is treated as a Multiplier, however, it's not communicated to the end-user, ultimately believing the user may want to increase the mouse sensitivity to...10.00 while keeping the Crosshair Sens around 3.00. The user found out that it increased the Crosshair Speed as a result

This addresses #595, which the Crosshair Speed becomes independent of the general Mouse Camera system, allowing Joanna Dark to mix-and-match sensitivity styles.

As this PR will once again override user's muscle memory, this will require playtesting from KB/M users on how the overall Crosshair Scaling feels. the end goal is getting a sweet spot between regular mouse camera and crosshair camera within a default slider of 2.50, this will be tricky to nail. this'd be a Draft PR for the time being.

edit: this also includes a unified Camera Sensitivity scaling system, makes thing easier to manage while potentially introducting future input-related features like Flick Stick

@AL2009man AL2009man changed the title Decoupled Mouse Crosshair Speed {Aiming] from Mouse Speed [Camera] Decoupled Mouse Crosshair Speed [[Aiming] from Mouse Speed [Camera] May 29, 2025
@AL2009man AL2009man changed the title Decoupled Mouse Crosshair Speed [[Aiming] from Mouse Speed [Camera] Decoupled Mouse Crosshair Speed [Aiming] from Mouse Speed [Camera] May 29, 2025
@AL2009man AL2009man changed the title Decoupled Mouse Crosshair Speed [Aiming] from Mouse Speed [Camera] Decouples Mouse Crosshair Speed [Aiming] from Mouse Speed [Camera] May 29, 2025
AL2009man added 3 commits May 29, 2025 14:02
…r Mouse Sens

backported the unified Camera sens scale system from a separate PR over to here, while changing overall Crosshair Mouse scaling to closely mirror default mouse camera sens.
@AL2009man AL2009man marked this pull request as ready for review May 29, 2025 21:01
@AL2009man
Copy link
Copy Markdown
Author

AL2009man commented May 29, 2025

took some time adjusting of the Crosshair Mouse Speed scaling.

it should now be closer to the main Camera Mouse movement (at default 2.5 settings) while ensuring the muscle memory portion is consistent for those who are already gotten used to it. Thus: the final mouse crosshair speed default will be 2.50.

@AL2009man AL2009man marked this pull request as draft May 29, 2025 21:30
AL2009man added 2 commits May 29, 2025 18:00
found out a separate issue while revising the camera scaling, for now: this will be reverted back to how it was.
@AL2009man AL2009man marked this pull request as ready for review May 29, 2025 22:01
@fgsfdsfgs
Copy link
Copy Markdown
Owner

Please fix up the whitespace in all of your changes. Seems like you have it set to use two tabs instead of one for indents or something.

@AL2009man
Copy link
Copy Markdown
Author

AL2009man commented Jun 11, 2025

Please fix up the whitespace in all of your changes. Seems like you have it set to use two tabs instead of one for indents or something.

had to do last-minute whitespacing fix (i'm switching to Visual Studios Code), while doing regression fixes.

but I did found a bug. setting Mouse Camera to 0.00 causes Mouse Crosshair to not work. remnants of the old system. so i'll need to go ahead and get that fixed soonish (got IRL Stuffs to do, but I'll come back a bit later.)

edit: can't get it fixed, unfortunately. :(

@fgsfdsfgs
Copy link
Copy Markdown
Owner

but I did found a bug. setting Mouse Camera to 0.00 causes Mouse Crosshair to not work. remnants of the old system. so i'll need to go ahead and get that fixed soonish (got IRL Stuffs to do, but I'll come back a bit later.)

Well, if you set the sensitivity to 0, that's kind of expected, isn't it. Unless I'm misunderstanding.

Can you also nuke mouseaimspeedx and mouseaimspeedy from the extcfg struct since they're not used anymore?

@AL2009man
Copy link
Copy Markdown
Author

but I did found a bug. setting Mouse Camera to 0.00 causes Mouse Crosshair to not work. remnants of the old system. so i'll need to go ahead and get that fixed soonish (got IRL Stuffs to do, but I'll come back a bit later.)

Well, if you set the sensitivity to 0, that's kind of expected, isn't it. Unless I'm misunderstanding.

Can you also nuke mouseaimspeedx and mouseaimspeedy from the extcfg struct since they're not used anymore?

it should be replaced with the new version. it can't be exactly nuked, tho

@bangstk
Copy link
Copy Markdown

bangstk commented Jun 17, 2025

In my opinion the setup that makes the most sense is if only Mouse Speed affected the camera turning speed, and then Crosshair Speed was represented as a ratio on top of that, affecting only the crosshair position. That way you can set the Crosshair Speed to "1.0" to get the same crosshair position relative to current turning rate (in degrees per second) as the original game, regardless of what you have the Mouse Speed (Camera) set to.

Also, if you want to get testing/feedback from KB/M players it would be helpful if you provided some builds.

@AL2009man
Copy link
Copy Markdown
Author

Also, if you want to get testing/feedback from KB/M players it would be helpful if you provided some builds.

GitHub Action CI came to the rescue! (you can test out the build right now!)

@fgsfdsfgs
Copy link
Copy Markdown
Owner

fgsfdsfgs commented Jun 25, 2025

it should be replaced with the new version. it can't be exactly nuked, tho

Why? There's no more purpose in having an additional aim multiplier in the Game settings if you have the actual aim sensitivity in Input settings. And it looks like you've removed its usage from the aim code.

@AL2009man AL2009man closed this Jun 25, 2025
@AL2009man AL2009man reopened this Jun 25, 2025
@AL2009man AL2009man marked this pull request as draft June 25, 2025 21:26
@AL2009man AL2009man marked this pull request as draft June 25, 2025 21:26
@AL2009man AL2009man marked this pull request as ready for review June 25, 2025 22:43
Inorder to be more consistent with the previous `mouseaimspeedx/y`,  the entire thing has been "nuked".
This fixes a problem where Mouse Crosshair Sensitivity is forcefully set to 0 when Mouse Sensitivity is also set to 0. This should let you keep the same mouse crosshair sens but turn off Mouse Sens and might prefer using keyboard keys for camera movement?
@AL2009man
Copy link
Copy Markdown
Author

AL2009man commented Jul 13, 2025

but I did found a bug. setting Mouse Camera to 0.00 causes Mouse Crosshair to not work. remnants of the old system. so i'll need to go ahead and get that fixed soonish (got IRL Stuffs to do, but I'll come back a bit later.)

Well, if you set the sensitivity to 0, that's kind of expected, isn't it. Unless I'm misunderstanding.

turns out, it was that was causing this particular issue.

allowmcross = (PLAYER_EXTCFG().mouseaimmode == MOUSEAIM_CLASSIC) &&
       (movedata.freelookdx || movedata.freelookdy || g_Vars.currentplayer->swivelpos[0] || g_Vars.currentplayer->swivelpos[1]);

simply removing the one below, like this:

inputMouseGetScaledDelta(&movedata.freelookdx, &movedata.freelookdy);
allowmcross = (PLAYER_EXTCFG().mouseaimmode == MOUSEAIM_CLASSIC);

addresses the issue, but this might need some additional reviewing to see if something feels...off. Based on my testings: it should not affect Mouse Crosshair Lock function.


Can you also nuke mouseaimspeedx and mouseaimspeedy from the extcfg struct since they're not used anymore?

I believe i got it solved, while also maintaining backwards compatibility with existing pd.ini. This might break everyone's muscle memory in the process even further, as the old function will be entirely replaced and the default will mirror Mouse Camera sens. :)

regardless: don't merge this PR until #631 get merged in first, consider it a safety-net in case of conflicts while rapid-merging.

overhauled the entire Crosshair logic, while adjusting deltacrosshair scaling to reflect the recent changes
@AL2009man AL2009man marked this pull request as draft August 17, 2025 22:56
@AL2009man AL2009man marked this pull request as ready for review August 18, 2025 16:14
@AL2009man AL2009man closed this Aug 23, 2025
@AL2009man AL2009man changed the title Decouples Mouse Crosshair Speed [Aiming] from Mouse Speed [Camera] [Migrated to PR #648] Decouples Mouse Crosshair Speed [Aiming] from Mouse Speed [Camera] Aug 23, 2025
@AL2009man
Copy link
Copy Markdown
Author

Decided to migrate this PR over to #648 to reduce the amount of commit history, plus: I think it's better to combine it with the overhauled Camera system

@AL2009man
Copy link
Copy Markdown
Author

AL2009man commented Aug 23, 2025

In my opinion the setup that makes the most sense is if only Mouse Speed affected the camera turning speed, and then Crosshair Speed was represented as a ratio on top of that, affecting only the crosshair position. That way you can set the Crosshair Speed to "1.0" to get the same crosshair position relative to current turning rate (in degrees per second) as the original game, regardless of what you have the Mouse Speed (Camera) set to.

Also, if you want to get testing/feedback from KB/M players it would be helpful if you provided some builds.

@bangstk I experimented with that, but that method won't work well. I believe it's better to keep both separate in case of crazier mouse configurations.

instead: I opted to change the mouse crosshair sens scaling to similar with Gyro Aim's Crosshair slider (internally: it's 0.022f / 90.0f base scale), that means the default slider has been changed to 5.00. it's somewhat closer to the ratio idea. (also: Crosshair movement is closer to raw mouse)

even tho I intentionally migrated this PR over to #676 for easing up commit history bloat (and unable to fix a specific bug preventeed me from keep this PR open), i can still provide you the download link based on the newer PR: https://github.com/fgsfdsfgs/perfect_dark/actions/runs/17168718558 (or click this button directly, if ur on Windows)

@AL2009man AL2009man changed the title [Migrated to PR #648] Decouples Mouse Crosshair Speed [Aiming] from Mouse Speed [Camera] [Migrated to PR #676] Decouples Mouse Crosshair Speed [Aiming] from Mouse Speed [Camera] Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants