| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An unofficial head tracking mod for Fallout 4 that moves the view with your head while your mouse or controller keeps aiming, driven by a webcam, phone, or any OpenTrack compatible tracker, with no VR headset required.
Download Lopari, choose Fallout 4, and click Play with head tracking.
If the installer cannot find your game, point it at the install folder yourself. Either pass the path as an argument:
install.cmd "D:\Games\Steam\steamapps\common\Fallout 4"The installer detects Steam, GOG and Xbox Game Pass copies, and stops at the first it finds in that order. If you own the game on more than one of them, point it at the one you actually play. An Xbox Game Pass copy lives in XboxGames on whichever drive you told the Xbox app to install to, and the folder to pass is the Content one inside it:
install.cmd "D:\XboxGames\Fallout 4\Content"Or set the FALLOUT_4_PATH environment variable before running it:
$env:FALLOUT_4_PATH = "D:\Games\Steam\steamapps\common\Fallout 4"
.\install.cmdinstall.cmd does everything below for you. Place the files by hand only if you would rather see exactly what lands where; both come out of the installer ZIP, as plugins/Fallout4HeadTracking.asi and vendor/ultimate-asi-loader/dinput8.dll.
Mod managers do not deploy this mod. An ASI plugin has to sit next to Fallout4.exe, and Fallout 4 mod managers deploy into Data/: Vortex has no way to reach the game root at all, and Mod Organizer 2 needs Root Builder on top of its virtual file system. Install into the game folder instead, with install.cmd or by hand.
If you already run ReShade as dxgi.dll, install the ASI loader as d3d11.dll instead (or rename it to one of the other slots above) so the two do not fight over the same filename.
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. The nav-cluster keys and the chords do exactly the same thing. These are the defaults: each action's keys are a list under [Hotkeys] in CameraUnlock.ini, chords included, and any of them can be changed 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 |
| Cycle aim mode | Insert | Ctrl+Shift+U |
| Next tracker source | - | Ctrl+Shift+J |
Page Up / Ctrl+Shift+G cycles tracking mode:
The tracking mode, the yaw mode and the aim mode are saved to CameraUnlock.ini the moment you change them, so the next launch starts with the same choice. Toggling tracking on or off with End lasts for the session only: each launch starts with tracking on or off as EnableOnStartup says.
Head tracking stays on while you aim, unless you pick stock sights below. The weapon stays where your mouse or controller points it, so with your head turned it sits off to one side with its sights still lined up, and your rounds land where those sights point. Head movement is scaled to the zoom, so a scope does not magnify it. Leaning in towards the screen is not scaled: it moves the view the same distance at any zoom.
Insert / Ctrl+Shift+U cycles four ways of aiming, and the mod saves the one you pick, so it holds the next time you start the game:
Leaning carries on through the aim. In sights locked, as the sights come up, your arms and weapon move with your head when you lean to the side or up and down, so the sights stay in front of your eye, and your rounds leave from where your eye is. Lean round a corner with the sights up and you can hit what you can see from there. In modes 2 and 3 the weapon stays with your body as you lean and your rounds leave from the weapon. Leaning in brings the sights closer in modes 1 to 3, and your eye stops just behind them while the view goes on leaning in. In third person the view keeps the whole lean while you aim.
A scope that fills the screen is handled as stock sights, whichever aim mode you have picked: while you look through it your head stops turning and leaning the view, so the scope's reticle is where the round goes. Tilting your head still tilts the view. To have the view follow your head through such a scope as your aim mode says, set TrackThroughScopes=true in CameraUnlock.ini. The scope's reticle is then no longer where the round goes with your head off its axis; in mode 2 the white marker is.
The view is the game's own while the Pip-Boy is up, and stays so for the half second the arm takes to lower. Head tracking then eases back in.
The character the game names while you aim at them, and the prompt that comes with it, is the one your sights are on, wherever your head is turned.
The marker of mode 2 is drawn over the finished frame through Direct3D 11. The mod leaves the game's presentation alone until the first time that marker is needed, so it touches nothing there in the other three modes.
The crosshair marks what you can pick up or use. It sits where your mouse or controller is aiming, wherever your head is turned or leaned, and that is the thing E acts on.
The mod reads its settings from 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. Changing a setting in Defaults.ini changes it in every game that has it set to default. 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:
; Fallout 4 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. Change a setting in Defaults.ini to change it in
; every game that has it set to default, or write a value here instead of default to change it
; 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
; true: write the mod's notices (tracking on or off, a mode change) to HeadTracking.log.
ShowNotifications=true
; false: while you look through a scope that fills the screen the view is the game's own, as in the stock sights aim mode, whichever aim mode you use for other sights, so the scope's reticle is where the round goes. Head roll still tilts it. true: the view follows your head through the scope as your aim mode says, and the reticle is then off the round.
TrackThroughScopes=false
[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
; false: while you aim down the sights, leaning keeps your eye on the sights.
; true: the weapon stays put and your head moves freely around it (true free look).
TrueFreeLook=default
; true, with TrueFreeLook=true: an aim marker shows where your shot will land while you aim down the sights.
; It does nothing while TrueFreeLook is false.
FreeLookMarker=default
; true: while you aim down the sights your head stops moving the view, apart from tilting it,
; so the sights sit in the centre as they do without head tracking. At the hip nothing changes.
StockSights=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
; true: leaning stops at walls instead of moving the view through them.
; Only games whose mod sweeps the level for walls read this; the rest ignore it.
CollisionEnabled=default
; How far the view is held off a wall when you lean into it, in the game's own units.
CollisionMargin=10.0
; Which of the game's collision channels the wall check tests against.
; CollisionChannel=39
; How gently the view eases back out after a wall stopped a lean.
; 0 is the quickest, 1 the slowest.
CollisionReleaseSmoothing=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=default
; Cycles the aim mode: sights locked, free look with a marker, true free look, stock sights
; (TrueFreeLook, FreeLookMarker, StockSights).
TrueFreeLookKey=default
; Switches to the next tracker app when more than one sends to the UDP port.
CycleTrackerSourceKey=Ctrl+Shift+JWorldSpaceYaw=true (the built-in value) keeps "up" locked to the world horizon, so yawing while looking at the floor still pans left and right. Set it to false for camera-local yaw, which rotates around the camera's current up-axis. Toggle it live with Page Down; the mod saves the choice.
The mod has no sensitivity, deadzone or axis inversion settings. It applies the pose your tracker sends, so set those in the tracker.
The mod adds no field-of-view setting, because Fallout 4 already has two and a third would only disagree with them.
Head tracking follows whichever you use, without a restart, and it keeps the amount your head moves the view the same at any field of view. When the game narrows the view by itself, down a scope or through iron sights, the same head turn would otherwise sweep the picture much further and feel like the sensitivity had jumped; the mod scales the pose so it does not. Roll is left alone, because a head tilt rotates the picture by the same angle whatever the field of view.
While the mod is loaded, the game's weapon debris effect (NVIDIA FleX, "Weapon Debris" in the game launcher's advanced settings) is switched off. With it on, Fallout 4 can crash inside its own FleX library within a minute or so of a save loading. That was measured on an RTX 5080 with the mod's hooks not installed, so it is the game's fault and not the mod's, but it reads as the mod crashing the game.
The switch lasts for the session only. bNVFlexEnable in Documents\My Games\Fallout4\Fallout4Prefs.ini is left as you have it, also when the game saves its settings, so the game behaves as before once the mod is removed. HeadTracking.log says at startup whether it switched the effect off or found it off already.
Download the new release and run install.cmd again. The installer ships no config, so CameraUnlock.ini is left as it is.
Run uninstall.cmd. This removes the mod files and leaves CameraUnlock.ini in place, so a reinstall keeps your settings. The ASI loader is only removed if the installer put it there; if you already had your own, it is left alone. Use uninstall.cmd /force to remove it anyway.
Requires CMake 3.20 or newer, Visual Studio 2022 with the C++ workload, and pixi. The mod targets MSVC x64.
git clone --recursive https://github.com/itsloopyo/fallout-4-headtracking
cd fallout-4-headtracking
pixi run build-release
pixi run packagepixi run package writes the installer ZIP to release/.
MIT License - see LICENSE for details. Bundled and linked third-party components keep their own licenses; see THIRD-PARTY-NOTICES.md.
This mod is not affiliated with, endorsed by, or supported by Bethesda Game Studios or Bethesda Softworks. It requires a legitimately purchased copy of the game. Use at your own risk.
| Back | FazBrowse Home | New Git URL |