| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An unofficial head tracking mod for Yakuza 0 that moves the camera with your head while your mouse or controller keeps control of movement, driven by a webcam, phone, or any OpenTrack compatible tracker, with no VR headset required.
Download Lopari, choose Yakuza 0, and click Play with head tracking.
If the installer can't find your game, point it at the install folder yourself, either way works:
# Option 1: environment variable
$env:YAKUZA_0_PATH = "D:\Games\Yakuza 0"; .\install.cmd
# Option 2: pass the path directly
.\install.cmd "D:\Games\Yakuza 0"For users who prefer to place files by hand:
Alternatively, the Nexus ZIP (Yakuza0HeadTracking-vX.Y.Z-nexus.zip) extracts directly into the game's install folder; it contains only media\Yakuza0HeadTracking.asi, so you still need an ASI loader installed.
The mod listens for OpenTrack pose data on UDP port 4242, on every network interface. One datagram is six little-endian 64-bit floats in the order x, y, z, yaw, pitch, roll: position in centimetres, rotation in degrees, 48 bytes in total. Anything that sends that to that port drives the view. OpenTrack's UDP over network output sends exactly this, and the steps below set it up.
OpenTrack ships a neuralnet tracker input that reads a plain webcam. Select it under Input, pick your camera in its settings, and use the output settings above. How well it tracks depends on your camera and your lighting, so try it before buying anything.
A phone app can reach the mod directly, with no OpenTrack on the PC, if it sends the datagram described above. Point it at this PC's IP address (run ipconfig to find it) on port 4242. Not every phone tracker speaks this protocol, so check yours for an OpenTrack or UDP output option first. Headcam sends it, and I wrote it so decent tracking is free for anyone who already owns a phone.
Sending direct works when the app filters its own signal on the device. The mod's smoothing is sized to take the edge off a clean signal rather than to rescue a noisy one, so a raw feed sent direct will jitter. If it does, point the app at OpenTrack's UDP over network input on some other port, say 5252, and let OpenTrack's filters and curves clean it up before its output forwards to 127.0.0.1:4242.
Anything arriving from outside 127.0.0.0/8 counts as a remote connection and is smoothed with RemoteSmoothing rather than LocalSmoothing. That includes a tracker on this very PC that sends to the machine's own LAN address, because the mod reads the source address and not the machine.
If your device has an OpenTrack input driver, select it under Input and use the same output settings. OpenTrack's own Input list is the authority on what it can read; the mod only ever sees what OpenTrack sends.
Centring belongs to your tracker. The mod subtracts no centre of its own: it applies the pose it receives exactly as it arrives, so a stream of zeros holds the view where the game itself puts it. Press the centre control in your tracker (OpenTrack's Center bind, or the CENTER button in Headcam) and the tracker zeroes its own output, which leaves the view centred with the mod doing nothing.
That is why there is no centre hotkey here and nothing to re-centre in game. Two centres in series would drift apart, because each side re-centres at moments the other cannot see, and you would end up pressing twice to centre once. If the view sits off to one side, centre it in the tracker.
Two equivalent binding sets - use whichever your keyboard has. These are the defaults of the key lists in CameraUnlock.ini (see Configuration), where each key, chords included, can be rebound or removed:
| Action | Nav-cluster | Chord |
|---|---|---|
| Toggle tracking | End | Ctrl+Shift+Y |
| Cycle tracking mode | Page Up | Ctrl+Shift+G |
| Toggle yaw mode | Page Down | Ctrl+Shift+H |
There is no recenter key. The mod applies the pose your tracker sends as-is, so centre it in the tracker app: OpenTrack's Center bind, or the CENTER button in Headcam.
Page Up / Ctrl+Shift+G cycles tracking mode:
Page Down / Ctrl+Shift+H toggles between world-space (horizon-locked) yaw and camera-local yaw.
The tracking mode and the yaw mode are saved to CameraUnlock.ini the moment they change, so they come back at the next launch. End / Ctrl+Shift+Y changes the current session only: tracking starts on or off as EnableOnStartup says.
The mod reads its settings from media\CameraUnlock.ini in the game folder, and creates the file when it starts and finds none. Edit it with any text editor.
A setting set to default takes its value from Defaults.ini, which every head tracking mod that keeps its settings in CameraUnlock.ini reads. Head tracking mods that keep their settings in another file do not read it. Writing a value in place of default changes that setting for this game only. When the mod saves a setting that a hotkey changed in game, it writes the new value in place of default, so that setting no longer follows Defaults.ini in this game until you set it to default again.
Defaults.ini is %AppData%\CameraUnlock\Defaults.ini on Windows; $XDG_CONFIG_HOME/CameraUnlock/Defaults.ini on Linux, or ~/.config/CameraUnlock/Defaults.ini where XDG_CONFIG_HOME is not set, under Wine and Proton too; and ~/Library/Application Support/CameraUnlock/Defaults.ini on macOS. The mod's log, where it writes one, names the file it read.
When the mod starts and finds no Defaults.ini, it creates one holding the built-in values, unless Windows runs the game as a packaged app. The mod never changes Defaults.ini after that. Edit it with any text editor.
The built-in value of each setting set to default below:
With every setting at its default, the file reads:
; Yakuza 0 head tracking settings.
; Comments start with ; and go on their own line. Text after a value is part of the value.
; Hotkeys are key names such as End, PageUp or Ctrl+Shift+Y. Separate several with commas; leave empty for none.
; A setting set to default takes its value from Defaults.ini, which every head tracking mod
; that keeps its settings in CameraUnlock.ini reads: %AppData%\CameraUnlock\Defaults.ini on
; Windows, $XDG_CONFIG_HOME/CameraUnlock/Defaults.ini (normally ~/.config/CameraUnlock) on
; Linux, under Wine and Proton too, and ~/Library/Application Support/CameraUnlock/Defaults.ini
; on macOS. The log names the file it read. Write a value instead of default to change that
; setting for this game only.
[CameraUnlock]
; Written by the mod. Leave this section in place.
ConfigFormat=1
[Network]
; UDP port the mod receives tracker data on (OpenTrack protocol).
UdpPort=default
[General]
; true: head tracking is on when the game starts. ToggleKey turns it on and off.
EnableOnStartup=default
; true: yaw turns around the world's up axis. false: around the camera's own up axis.
WorldSpaceYaw=default
; true: turning your head turns the view.
; Tracking mode at startup, with PositionEnabled. The mode hotkey changes both.
RotationEnabled=default
[Smoothing]
; Smoothing when the tracker runs on this PC. 0 is the least, 1 the most.
LocalSmoothing=default
; Smoothing when the tracker is another device on the network, such as a phone.
; 0 is the least, 1 the most.
RemoteSmoothing=default
[Position]
; true: moving your head moves the view.
; Tracking mode at startup, with RotationEnabled. The mode hotkey changes both.
PositionEnabled=default
; How far, in metres, leaning left or right can move the view.
PositionLimitX=default
; How far, in metres, raising your head can move the view.
PositionLimitY=default
; How far, in metres, lowering your head can move the view.
PositionLimitYDown=default
; How far, in metres, leaning forward can move the view.
PositionLimitZ=default
; How far, in metres, leaning back can move the view.
PositionLimitZBack=default
[Hotkeys]
; Turns head tracking on and off.
ToggleKey=default
; Changes the tracking mode: rotation and position, rotation only, position only.
CycleTrackingModeKey=default
; Switches yaw between the world's up axis and the camera's own (WorldSpaceYaw).
YawModeKey=defaultMod not loading:
No tracking response:
Jittery / unstable tracking:
Yaw feels wrong when looking up or down at extreme angles:
Download the new release and run install.cmd again. Your config is preserved.
Run uninstall.cmd from the installer ZIP. This removes the mod files and leaves your settings in media\CameraUnlock.ini. The ASI loader is only removed if the installer put it there; use uninstall.cmd /force to remove it anyway.
Requires Visual Studio 2022 Build Tools, CMake 3.20+, and pixi.
git clone --recurse-submodules https://github.com/itsloopyo/yakuza-0-headtracking
cd yakuza-0-headtracking
pixi run build
pixi run test
pixi run packageMIT License - see LICENSE for details. Third-party components are listed in THIRD-PARTY-NOTICES.md.
This mod is not affiliated with, endorsed by, or supported by Ryu Ga Gotoku Studio or Sega. Use at your own risk.
| Back | FazBrowse Home | New Git URL |