Mouse camera control: locked cursor, button edges, smoothed right-stick deltas #377

Closed
github-bot wants to merge 656 commits from github-bot/gh-377 into main AGit
Owner

@⁠ztsvvstz1337 on GitHub · 2026-11-27 20:58 UTC · original
ztsvvstz1337:feat/mouse-look → main · +60912 −5438 · 207 files · 656 commits · closed without merging

Adds mouse camera control to the keyboard stand-in pad in victory-hle.

  • Mouse deltas become the fallback pad's right stick through a smoothed 45 ms half-life (MouseLook), with base sensitivity 0.022 and a [-1, 1] clamp.
  • LMB, RMB and MMB press RT, LT and R3, with edge capture so a button held on window chrome or another app does not fire when dragged into the client area.
  • The cursor is recentred at the client centre every 8 ms while the title window is focused and hidden through the lifecycle WM_SETCURSOR hook. F2 toggles the lock; Esc or P releases it for menus. Focus loss or an inactive stand-in disarms it.
  • VICTORY_MOUSE_LOOK is on by default (=0 disables it); VICTORY_MOUSE_SENS and VICTORY_MOUSE_INVERT_Y=1 override sensitivity and Y direction.
  • The switches and controls are documented in docs/README-fxceless.md.

This is the current local implementation and complements the earlier mouse-look work in #256: #256 maps focused mouse motion and confines the pointer, while this adds cursor hiding, edge-captured buttons and the smoothed delta path.

Verification on this branch based on main 0148258:

  • cargo test -p victory-hle --locked: 223 library tests passed, 3 ignored; mouse_look.rs integration tests 33/33 passed; dlss/fidelityfx/no_dll integrations also passed.
  • cargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean.

In-game camera behaviour was not recorded here; the evidence is the unit/integration suite.

**@⁠ztsvvstz1337** on GitHub · 2026-11-27 20:58 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/377) `ztsvvstz1337:feat/mouse-look` → `main` · +60912 −5438 · 207 files · 656 commits · closed without merging Adds mouse camera control to the keyboard stand-in pad in `victory-hle`. - Mouse deltas become the fallback pad's right stick through a smoothed 45 ms half-life (`MouseLook`), with base sensitivity 0.022 and a `[-1, 1]` clamp. - LMB, RMB and MMB press RT, LT and R3, with edge capture so a button held on window chrome or another app does not fire when dragged into the client area. - The cursor is recentred at the client centre every 8 ms while the title window is focused and hidden through the lifecycle `WM_SETCURSOR` hook. **F2** toggles the lock; **Esc** or **P** releases it for menus. Focus loss or an inactive stand-in disarms it. - `VICTORY_MOUSE_LOOK` is on by default (`=0` disables it); `VICTORY_MOUSE_SENS` and `VICTORY_MOUSE_INVERT_Y=1` override sensitivity and Y direction. - The switches and controls are documented in `docs/README-fxceless.md`. This is the current local implementation and complements the earlier mouse-look work in #256: #256 maps focused mouse motion and confines the pointer, while this adds cursor hiding, edge-captured buttons and the smoothed delta path. Verification on this branch based on `main` `0148258`: - `cargo test -p victory-hle --locked`: 223 library tests passed, 3 ignored; `mouse_look.rs` integration tests 33/33 passed; dlss/fidelityfx/no_dll integrations also passed. - `cargo clippy -p victory-hle --all-targets --locked -- -D warnings`: clean. In-game camera behaviour was not recorded here; the evidence is the unit/integration suite.
Mouse deltas drive the fallback pad's right stick with a smoothed 45 ms half-life; LMB/RMB/MMB press RT/LT/R3. The cursor is recentred and hidden while the title window has focus, F2 toggles the lock, and Esc or P releases it. VICTORY_MOUSE_LOOK defaults on, with VICTORY_MOUSE_SENS and VICTORY_MOUSE_INVERT_Y overrides. The integration tests cover the mouse look and button edge capture.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:03:52 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-29 11:37 UTC · original

Thanks for the implementation and the test results. The follow-up in #220 supports the smoothed camera path on a virtual-pad setup. Before expanding it, please check mouse-button triggers, cursor release on focus loss and F2/Esc, and interaction with a real controller. The integration suite is not a substitute for those input checks.

**@⁠TaynanGT** on GitHub · 2026-11-29 11:37 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/377#issuecomment-7255241296) Thanks for the implementation and the test results. The follow-up in #220 supports the smoothed camera path on a virtual-pad setup. Before expanding it, please check mouse-button triggers, cursor release on focus loss and F2/Esc, and interaction with a real controller. The integration suite is not a substitute for those input checks.
github-bot closed this pull request 2026-11-30 17:14:41 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-30 17:10 UTC · original

main has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current main and open a new PR; I'll review it there.

**@⁠TaynanGT** on GitHub · 2026-11-30 17:10 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/377#issuecomment-7285845983) `main` has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current `main` and open a new PR; I'll review it there.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.