Input: mouse look through the stand-in pad's right stick (the title reads no GameInput mouse) #142
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!142
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-142"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@DenseCow on GitHub · 2026-11-27 18:49 UTC · original
DenseCow:mouse-look-right-stick→main· +92 −2 · 2 files · 1 commits · openWhy
The title reads only the gamepad. It ignores the GameInput mouse device, so with
VICTORY_MOUSE_CAPTURE=1(F1, MOUSE CAPTURE) the cursor is captured but the camera does not move. #103 reported the same thing.What
gameinput.rs: the captured mouse's motion now drives the stand-in pad's right stick. The left button is the right trigger and the right button the left trigger. These merge with the keyboard and any real pad, in the same way the keyboard and pads already merge. The stick value is eased over polls, so a poll that falls between two mouse samples does not snap the stick back to the middle. Movement starts above a floor so that small motions get past the title's dead zone.VICTORY_MOUSE_STICK=0turns it offVICTORY_MOUSE_SENS: stick per pixel moved in one poll (default 0.06)VICTORY_MOUSE_FLOOR: least push once the mouse moves (default 0.25)VICTORY_MOUSE_INVERT_Y=1: inverts up and downplay-foxhound.ps1: when mouse capture is on andVICTORY_MOUSE_WARPwas not set, warp is turned on. Without it, the held cursor stops at the window's edge and turning stops with it. An explicitVICTORY_MOUSE_WARP=0is still respected.Nothing changes while mouse capture is off; capture stays off by default.
Testing
mouse_motion_turns_the_right_stick: reference sample, stick and trigger values, easing back to centre, no jump after focus loss, and the off switch.cargo test -p victory-hle --locked: 172 passed, 0 failed.gameinput.rs. The workspace-wide CI gates fail onmainwithout this change: clippy invictory-formatsandvictory-gpu, andindirect::tests::host_list_budget_starts_empty_at_each_submission/warp_batch_charges_every_execution. Those are the failures #67 and #86 address.play-nvidia.ps1with mouse capture on: the camera turns with the mouse (before this change it did not move at all).🤖 Generated with Claude Code
@ardgndg on GitHub · 2026-11-27 19:30 UTC · original
how do you get mouse working?mine doesnt work at all
@DenseCow on GitHub · 2026-11-27 19:36 UTC · original
@ardgndg On
mainthe mouse does nothing for anyone. The game only reads the gamepad, so turning on mouse capture holds the cursor in the window but the camera never moves. This PR is the fix: it feeds the mouse into the right stick of the built-in pad. Until it is merged, you need to build this branch.1. Get and build the branch (from your VIctory-NVIDIA folder):
2. Start with mouse capture on:
You can also set it in the F1 menu (MOUSE CAPTURE), but that one only applies from the next start. With this branch the launcher turns on
VICTORY_MOUSE_WARPfor you, which keeps the camera from stopping when the cursor reaches the window's edge.Controls: the mouse turns the camera, left button is the right trigger, right button is the left trigger. The keyboard still does everything else.
If it feels too slow or too fast, add a sensitivity to
-More. The default is 0.06, and higher is faster:VICTORY_MOUSE_INVERT_Y='1'flips up and down.Keep in mind the game still thinks it is getting a stick, so it feels like a pad stick and not like raw mouse aim. I have only tried it on an RTX 5070, so tell me here if it does not turn for you.
@Mericas77 on GitHub · 2026-11-27 21:47 UTC · original
Tested on an RTX 4070, Windows 11: this PR (
eb531ae) merged ontomainatdf2daaf, release build, started asvictory.exebeside the title (not the script launcher). The PR's unit test passes.With
victory.exe, mouse look stops at the window's edge. With F1 > MOUSE CAPTURE > ON, the camera follows the mouse, but only for a short way: the cursor reaches the edge of the window and turning stops with it.Adding
VICTORY_MOUSE_WARP=1fixes it. I added that line to%LOCALAPPDATA%\victory\victory-settings.txtand started again: the camera then turns without a limit.The cause, as far as I can see: the PR switches the warp on in
scripts/play-foxhound.ps1when mouse capture is on, but the built-in launcher (apps/victory/src/play.rs) doesn't, andcaptured_mouse_deltainlifecycle.rsonly puts the cursor back in the middle withVICTORY_MOUSE_WARP=1. Most people start the released exe, so they would get the stuck camera. The same default inplay.rs(warp on when capture is on andVICTORY_MOUSE_WARPisn't set) should cover it.The right mouse button works as the left trigger: it aims.
Not checked: the left button as the right trigger, sensitivity, and the inverted Y switch.
@cloph-dsp on GitHub · 2026-11-28 01:32 UTC · original
Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):
eb531ae507b2178fe69f547dd008675c8d0caa31, base29d8dbf7d9892ceb8bec378a9dbc3c4f2931b745.cargo test --locked -p victory-hle --lib -- modules::gameinput::tests::mouse_motion_turns_the_right_stick --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 173 filtered, exit 0.git grep -Ffor the test name on the base returned no hits (test is new on this PR);git diff --check 29d8dbf7d HEADclean (2 files, +92/-2: the gameinput source plus a 2-line env-var default in scripts/play-foxhound.ps1 — no game data).CARGO_TARGET_DIR(target-142-watch) withCARGO_BUILD_JOBS=2.AI-assisted (Hy4 flash).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.