Direct 1:1 mouse camera (opt-in, LARP_MOUSE_CAMERA=direct), ported from Darner #46
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/gamingwithhomie--larp!46
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-46"
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?
@IndianStalker on GitHub · 2026-12-05 16:21 UTC · original
IndianStalker:direct-mouse-camera→main· +705 −1 · 6 files · 1 commits · merged 2026-12-05 19:00 UTCWhat it does
Adds an optional direct mouse camera. With
LARP_MOUSE_CAMERA=direct(and mouse and keyboard on), the mouse turns the game's look camera directly instead of moving the right stick: no stick, no dead zone, no smoothing, no acceleration. Aiming and scopes slow it with the game's own zoom scale.Off by default. Without the switch nothing changes: the mouse keeps going to the right stick as today.
How
crates/larp-hle/src/mousehook.rs(new): hookslook_pull(0x140e4e3d0, build 1.0.2.1 only; the prologue is checked first, otherwise nothing is hooked) and adds the raw mouse counts × sensitivity × zoom to the camera's heading and pitch.crates/larp-loader/src/callhook.rs(new): the entry/return hook helper it uses.gameinput/mouse.rs: Raw Input motion also feeds the camera; while the camera is live, the stick gets 0 from the mouse.apps/larp/src/run.rs: installs the hook before the title runs.Falls back to the stick automatically
Settings
LARP_MOUSE_CAMERA=direct: turns it on.controls.inisensitivityandinvert_yapply to both modes.LARP_MOUSE_CAMERA_SENS: radians per mouse count (default0.0015, Darner's).Credit
The look hook, the radial wheel check and
callhook.rsare from Darner (TrustNo1, GPL-3.0). This is a port onto larp's existing mouse and keyboard code.Tested
Builds on
main(b39145e) with no new warnings. Now being played on an RTX 4070 Ti (Series X, mouse and keyboard); I'll add the results here.🤖 Generated with Claude Code
@execor2137 on GitHub · 2026-12-05 18:35 UTC · original
This works great, feels nothing like analog sticks. Feels like native PC game.
github-bot referenced this pull request2026-12-05 19:01:07 +00:00
github-bot referenced this pull request2026-12-05 19:54:49 +00:00