Wii IR scale: preserve stock cursor speed regardless of scale value#155
Open
Wii IR scale: preserve stock cursor speed regardless of scale value#155
Conversation
…urve The previous linear IR scale (scaledX = 0.5 + (finalX-0.5)*scale) changed both coverage and physical-to-screen sensitivity uniformly, making the cursor feel 2× faster (scale=2) or 2× slower (scale=0.5) everywhere on screen. Replace with a smooth, position-dependent curve using a cubic smooth-step weight (smoothstep(0,1,t) = 3t²−2t³): - Weight = 0 at screen centre → effective scale = 1.0 → stock speed - Weight = 1 at physical screen edge → effective scale = `scale` This preserves aiming precision in the centre of the screen regardless of the scale value, while still extending (scale>1) or contracting (scale<1) the cursor's reachable area toward the edges. The smooth curve is monotone for scale ≥ 0.5; the original linear formula is kept as a fallback for scale < 0.5 to avoid non-monotone (backwards) cursor movement at extreme compression. Also fix a pre-existing mixed-precision literal on the finalY calculation (1.0f → 1.0). Co-authored-by: dazzaXx <48131734+dazzaXx@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Wii IR scaling to maintain stock speed
Fix Wii IR scaling: preserve stock centre-screen speed via smooth-step curve
Mar 13, 2026
WII_IR_SCALE now only affects cursor coverage/reach — the cursor always tracks at stock (1:1) speed regardless of the configured scale value. A cubic smooth-step weight (smoothstep(0,1,t) = 3t²−2t³, t = normalised distance from screen centre) blends the effective scale from 1.0 at the centre to `scale` at the physical screen edge. The derivative at the centre is always exactly 1.0, so centre-screen aiming speed is unchanged no matter what scale is set. The linear fallback is kept for scale < 0.5 to prevent non-monotone (backwards) cursor movement at extreme compression values. Co-authored-by: dazzaXx <48131734+dazzaXx@users.noreply.github.com>
Copilot
AI
changed the title
Fix Wii IR scaling: preserve stock centre-screen speed via smooth-step curve
Wii IR scale: preserve stock cursor speed regardless of scale value
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WII_IR_SCALEwas a plain linear multiplier applied uniformly across the screen — setting it above 1.0 made the cursor faster everywhere, not just at the edges. The ask is to keep stock (1:1) tracking speed at all times while still allowing the scale to control how far the cursor reaches.Approach
Replaces the uniform linear formula with a cubic smooth-step position-dependent curve:
WII_IR_SCALEis set to.> 1.0) or contracted (< 1.0) as before.scale < 0.5— the smooth curve becomes non-monotone at extreme compression, so the original linear formula is kept below that threshold to prevent backwards cursor movement.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.