mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 05:05:56 +00:00
The free camera works on the keyboard and mouse: freecam_key switches it, the bound keys fly it and the mouse turns it
input.c freecam_gate also switches the free camera on a press of TOTK_FREECAM_KEY (f6 by default, none for no key). While it is on, ZL, ZR, L and R come from the merged Switch buttons, so the keys bound to them (Z, X, Q and R by default) go down, up and change the speed like the gamepad's; the keys' sticks already flew and turned it. The mouse's counts are taken in the poll and turn it at the game camera's rate (0.08 degrees a count times mouse_sens, through freecam_mouse), and input_direct_mouse_sample gives the game's mouse camera none meanwhile; in the stick emulation mode the mouse arrives in the right stick as before. The Controls tab gets a Free camera key row (off, F2 to F7, F9), with text in all four menu languages; docs/controls.md lists the keyboard column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
34b6b380ac
commit
5fa6db3c70
9 files changed
+106
-32
No files matched your search
+13
-12
@@ -131,20 +131,21 @@ bind_Y = pad:north, key:mouse_l
|
||||
|
||||
## Free camera
|
||||
|
||||
On game 1.4.3, ZL+ZR+L3 together (LT+RT+L3 on an Xbox pad; `freecam_pad` in `totk.ini` picks another combo, `none` none)
|
||||
detach the view from Link; the same combo brings it back. The world goes on, but the game gets no gamepad input while the
|
||||
free camera is on, so Link stands where he was.
|
||||
On game 1.4.3, ZL+ZR+L3 together (LT+RT+L3 on an Xbox pad) or F6 detach the view from Link; the same combo or key brings
|
||||
it back (`freecam_pad` and `freecam_key` in `totk.ini` and on the Controls tab pick others, `none` none). The world goes
|
||||
on, but the game gets no input while the free camera is on, so Link stands where he was.
|
||||
|
||||
| Input | Free camera |
|
||||
|---|---|
|
||||
| Left stick | forward and back along the view, and sideways |
|
||||
| ZR / ZL (RT / LT) | straight up / down, by how far the trigger is pressed |
|
||||
| Right stick | turn (yaw and pitch; pitch stops 5 degrees short of straight up or down) |
|
||||
| R / L (RB / LB) | each press doubles / halves the speed, 0.25 to 512 m/s |
|
||||
| Gamepad | Keyboard and mouse (default bindings) | Free camera |
|
||||
|---|---|---|
|
||||
| Left stick | W A S D | forward and back along the view, and sideways |
|
||||
| ZR / ZL (RT / LT) | X / Z | straight up / down; a trigger by how far it is pressed |
|
||||
| Right stick | mouse, arrow keys | turn (yaw and pitch; pitch stops 5 degrees short of straight up or down) |
|
||||
| R / L (RB / LB) | R / Q | each press doubles / halves the speed, 0.25 to 512 m/s |
|
||||
|
||||
The keys that drive the sticks (W A S D and the arrow keys by default) move it too. Each switch starts at the game
|
||||
camera's position and view at 8 m/s; the speed follows the clock, so it is the same at any frame rate and game speed.
|
||||
The horizon stays level.
|
||||
The keys are the ones bound to the left and right stick and to ZR, ZL, R and L (`bind_` lines), so remapped keys follow.
|
||||
The mouse turns the free camera at the game camera's rate (0.08 degrees a count at `mouse_sens = 1`) and the game's
|
||||
mouse camera gets none of it meanwhile. Each switch starts at the game camera's position and view at 8 m/s; the speed
|
||||
follows the clock, so it is the same at any frame rate and game speed. The horizon stays level.
|
||||
|
||||
How it works (`runtime/freecam.c`): the camera component update (main+0x628460) copies each component's eye, target
|
||||
and up into its sead camera. The site `freecam` (`recomp/patches-v143.txt`, main+0x6286d4) runs before that copy and
|
||||
|
||||
Reference in new issue
Block a user