WIP: feat(mouse): native mouse look for the aim, lock-on, riding and event cameras #352
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!352
Loading…
Reference in a new issue
No description provided.
Delete branch "rerum9982/Longshot:feat/native-mouse-cameras"
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?
Why
With Mouse camera on Native, only the follow camera turned with the mouse. The aim, the locked-on aim, lock-on's manual
turn, riding and talk/event cameras still got it as an emulated stick, and the view jumped up when the aim ended.
What changed
host/mouse_native.c+ hooks innx2/oot_patches.py: the mouse turns, one to one, the aim (f_827c0470), the otherstick-turned cameras (returns of f_80643e70/f_80643ac0), the locked-on aim (f_827de2a0) and lock-on's manual mode
(f_8072da10).
follow camera's view blend (+0x190) moved so the view no longer flicks up.
host/mouse_look.{h,c}: the game-agnostic math, separate from the glue.host/nn_hid.c: hands ZR/L (latched toggles included) to the mouse code.docs/development.mdswitches.Everything is a no-op with Mouse camera off (the default).
Flags and settings
HOS_MOUSE_DEBUG(set)HOS_MOUSE_AIM_SCALE=<x>Measurements
Not a performance change: input only (a few float reads and writes per frame on the active camera). One run of each,
tested once, fine.
main:
cf605c85(2026-11-14)this PR: feat/native-mouse-cameras @
b80b7299Hardware: AMD Radeon RX 6600, Windows 10, 16 GB
Scene: title screen, 1920x1080, 60 fps cap, Mouse camera Native
Method: one run of each build, about 50 s, the log's last
vk: N presents, F fpslinesHow to reproduce: start each build at the title and read the log
cf605c85b80b7299Testing
Tested:
tests/run_all.py --strict: 482 passed; the failures are the same as on main @cf605c85(no Vulkan headers, glslang or spirv-val on this PC), plus one GPU-timing check that passes when run alone. In the game on this build (merged with maincf605c85): aim withbow and slingshot, aim entry and exit (no flick), Z-target aim, lock-on turn, Epona, talk/event cameras, item wheel, and
controller-only play.
Not tested: the Tail and Fix cameras.
Needs other testers: None.
Screenshots
Nothing on screen: camera motion only.
Risk and rollback
Mouse camera off or As the stick: every hook is a no-op. Reverting the commit is enough.
Issues
None.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
mainand passing here.tests/that reads changed source updated in this PR, not weakened.With Mouse camera on Native the mouse now turns, one to one, the aim (bow, slingshot, hookshot, first person), the aim while locked on, lock-on's manual turn, riding and the talk/event cameras the stick turns, not only the camera that follows Link. - hooks: hos_mouse_aim (f_827c0470), hos_mouse_turn (returns of f_80643e70/f_80643ac0), hos_mouse_lock_aim (f_827de2a0), hos_mouse_lockon (f_8072da10 at 8072ee0c/8072f2a4) - the aim starts at the view's pitch; with Disable camera centering the follow camera keeps the aim's direction from the first frame, its view blend (+0x190) moved with it - the follow camera yields to every other camera hook in the same frame - HOS_MOUSE_DEBUG traces whose the mouse is, the lock-on mode and the follow camera - the game-agnostic arithmetic in host/mouse_look.{h,c} - tests: test_mouse_look, new test_mouse_native cases, the hold-to-toggle check for ZRMeasurement columns name their commits; the Linux build box added, unticked: not built here.
Measurements: the baseline column named, and why it is not main.
b80b729949ea1403cb89Rebased onto
main@7bacf846: one conflict in host/nn_hid.c: kept main's new walk/movement code and this PR'slast_buttons = *buttons;line before it. No tests were run here; the test boxes stay yours.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.