{"id":50652908,"url":"https://github.com/itsloopyo/sons-of-the-forest-headtracking","last_synced_at":"2026-06-07T22:01:03.347Z","repository":{"id":362370616,"uuid":"1241482681","full_name":"itsloopyo/sons-of-the-forest-headtracking","owner":"itsloopyo","description":"Sons of the Forest","archived":false,"fork":false,"pushed_at":"2026-06-03T22:24:58.000Z","size":33353,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T23:17:31.582Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsloopyo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T12:55:02.000Z","updated_at":"2026-06-03T22:24:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/itsloopyo/sons-of-the-forest-headtracking","commit_stats":null,"previous_names":["itsloopyo/sons-of-the-forest-headtracking"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/itsloopyo/sons-of-the-forest-headtracking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsloopyo%2Fsons-of-the-forest-headtracking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsloopyo%2Fsons-of-the-forest-headtracking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsloopyo%2Fsons-of-the-forest-headtracking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsloopyo%2Fsons-of-the-forest-headtracking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsloopyo","download_url":"https://codeload.github.com/itsloopyo/sons-of-the-forest-headtracking/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsloopyo%2Fsons-of-the-forest-headtracking/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34039495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-07T22:00:35.743Z","updated_at":"2026-06-07T22:01:03.341Z","avatar_url":"https://github.com/itsloopyo.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sons of the Forest Head Tracking\n\nHead tracking for Sons of the Forest using any OpenTrack-compatible tracker (webcam, phone, or VR headset): move your head to look around while your mouse or controller keeps aiming, no VR required.\n\n\u003c!-- ![Mod GIF](https://raw.githubusercontent.com/itsloopyo/sons-of-the-forest-headtracking/main/assets/readme-clip.gif) --\u003e\n\n\u003e [!CAUTION]\n\u003e **Experimental prototype - expect missing core features.**\n\u003e Head-tracked rotation and 6DOF position are working in-game, but on-screen\n\u003e reticle compensation is not yet implemented. Comfort tuning and edge cases\n\u003e are still in progress.\n\n## Features\n\n- **Decoupled look and aim** - head tracking moves the camera; aim stays on your mouse/controller\n- **6DOF positional tracking** - lean and peek with head position\n\n## Requirements\n\n- [Sons of the Forest](https://store.steampowered.com/app/1326470/Sons_Of_The_Forest/) (Steam) - a legitimately purchased copy\n- A tracking source - [OpenTrack](https://github.com/opentrack/opentrack) with a webcam, a phone tracking app, or a VR headset\n- Windows 10/11, 64-bit\n\n## Installation\n\n1. Download the latest `SonsOfTheForestHeadTracking-vX.Y.Z-installer.zip` from the [Releases page](https://github.com/itsloopyo/sons-of-the-forest-headtracking/releases).\n2. Extract it anywhere.\n3. Double-click `install.cmd`. It locates your Steam install of Sons of the Forest, installs BepInEx 6 IL2CPP (bundled) if you don't already have it, and deploys the mod to `BepInEx/plugins/`.\n4. Configure OpenTrack to output UDP to `127.0.0.1:4242` (see [Setting Up OpenTrack](#setting-up-opentrack)).\n5. Launch the game.\n\nIf the installer can't find your game, point it at your install folder either way:\n\n```bat\n:: Option 1: pass the path as an argument\ninstall.cmd \"D:\\Games\\Sons Of The Forest\"\n\n:: Option 2: set an environment variable, then run install.cmd\nset SONS_OF_THE_FOREST_PATH=D:\\Games\\Sons Of The Forest\ninstall.cmd\n```\n\n### Manual Installation\n\n1. Install [BepInEx 6 IL2CPP x64](https://github.com/BepInEx/BepInEx) into the Sons of the Forest game folder. The installer ZIP bundles a known-good copy at `vendor/bepinex/BepInEx_UnityIL2CPP_x64.zip`; extract it to the game root.\n2. Launch the game once so BepInEx initializes.\n3. Copy `SonsOfTheForestHeadTracking.dll` and `CameraUnlock.Core.dll` into `\u003cgame folder\u003e/BepInEx/plugins/`.\n\nAlternatively, the Nexus ZIP (`SonsOfTheForestHeadTracking-vX.Y.Z-nexus.zip`) contains only the plugin files: extract it over the game folder. You must already have BepInEx 6 IL2CPP installed.\n\n## Setting Up OpenTrack\n\nIn OpenTrack:\n\n- Output: `UDP over network`\n- Address: `127.0.0.1`, Port: `4242`\n- Input: whichever tracker you use (see below)\n\n### VR Headset Setup\n\nIf you have a VR headset but want to play on a flat screen:\n\n1. Connect the headset to your PC (Quest: Air Link or Virtual Desktop).\n2. Start SteamVR.\n3. In OpenTrack, set Input to `SteamVR` and start tracking.\n\n### Webcam Setup\n\n1. In OpenTrack, set Input to `neuralnet tracker`.\n2. Select your webcam and start tracking.\n\n### Phone App Setup\n\nPhone apps (SmoothTrack, Smartphone Head Tracker, and similar) can send directly to the game:\n\n- Point the app at your PC's LAN IP address, port `4242`. Most apps smooth the data themselves, so no OpenTrack relay is needed.\n- If you want OpenTrack's curve mapping and filtering, send the phone data to OpenTrack instead and have OpenTrack output UDP to `127.0.0.1:4242`.\n\n## Controls\n\nTwo equivalent binding sets - use whichever your keyboard has:\n\n| Action              | Nav-cluster | Chord           |\n|---------------------|-------------|-----------------|\n| Recenter            | `Home`      | `Ctrl+Shift+T`  |\n| Toggle tracking     | `End`       | `Ctrl+Shift+Y`  |\n| Cycle tracking mode | `Page Up`   | `Ctrl+Shift+G`  |\n| Toggle yaw mode     | `Page Down` | `Ctrl+Shift+H`  |\n\n`Page Up` / `Ctrl+Shift+G` cycles tracking mode:\n\n1. Normal head-tracked gameplay\n2. Positional tracking disabled, rotational tracking enabled\n3. Rotational tracking disabled, positional tracking enabled\n4. Back to normal\n\n## Configuration\n\nThe config file is created after the first launch with the mod installed:\n\n`\u003cgame folder\u003e/BepInEx/config/com.cameraunlock.sonsoftheforest.headtracking.cfg`\n\n```ini\n[General]\n# Enable head tracking automatically when the game starts.\nEnabledOnStartup = true\n# true = horizon-locked yaw (rotates around world up). false = camera-local yaw.\nWorldSpaceYaw = true\n\n[Sensitivity]\nYawSensitivity = 1\nPitchSensitivity = 1\nRollSensitivity = 1\n# Rotation smoothing (0 = none, 1 = heavy). A 0.15 floor is applied internally.\nSmoothing = 0\n\n[CoordinateTransform]\n# Flip an axis if it moves the wrong way.\nInvertYaw = false\n# Default on: converts OpenTrack pitch to Unity.\nInvertPitch = true\nInvertRoll = false\n\n[Position]\n# Positional (6DOF) tracking - lean and move your head to shift the camera.\nPositionEnabled = true\nPositionSensitivityX = 1\nPositionSensitivityY = 1\nPositionSensitivityZ = 1\n# Maximum displacement in meters.\nPositionLimitX = 0.3\nPositionLimitY = 0.2\nPositionLimitZ = 0.4\n# Backward lean limit (small, prevents clipping into the player).\nPositionLimitZBack = 0.1\nPositionSmoothing = 0.15\n# Default on: converts OpenTrack axes to Unity (verified for Sons of the Forest).\nInvertPositionX = true\nInvertPositionY = false\nInvertPositionZ = true\n\n[Hotkeys]\nToggleKey = End\nRecenterKey = Home\nYawModeKey = PageDown\nPositionToggleKey = PageUp\n```\n\n## Troubleshooting\n\n**Mod not loading**\n\n- Check `\u003cgame folder\u003e/BepInEx/LogOutput.log` for a \"loaded successfully\" line. If the file or line is absent, BepInEx did not load: re-run `install.cmd`.\n- The first launch after installing BepInEx takes noticeably longer while it generates interop assemblies. Let it finish.\n\n**No tracking response**\n\n- Confirm OpenTrack is started (the octopus moves) and its output is `UDP over network` to `127.0.0.1:4242`.\n- For phone trackers, point the app at this PC's LAN IP (not 127.0.0.1) and allow UDP port 4242 through Windows Firewall.\n- Press `End` (or `Ctrl+Shift+Y`) in case tracking was toggled off.\n\n**Jittery / unstable tracking**\n\n- Raise `Smoothing` in the config file (try 0.3 to 0.5).\n- Phone trackers over WiFi are the most jitter-prone; raise smoothing further or use a wired tracker.\n\n**Wrong rotation axis**\n\n- Toggle `InvertYaw` / `InvertPitch` / `InvertRoll` in the config file.\n- If yaw feels wrong when looking up or down at extreme angles, toggle between world-locked and camera-local yaw with `Page Down` (or `Ctrl+Shift+H`).\n\n**Crosshair drifts when looking around**\n\n- Aim stays on the mouse by design; on-screen reticle compensation is not yet implemented in this prototype.\n\n## Updating\n\nDownload the new release and run `install.cmd` again. Your config is preserved.\n\n## Uninstalling\n\nRun `uninstall.cmd`. This removes the mod DLLs. BepInEx is only removed if the installer put it there; use `uninstall.cmd /force` to remove it anyway.\n\n## Building from Source\n\nPrerequisites: Windows, [pixi](https://pixi.sh), and a local Sons of the Forest install (the build references the game's IL2CPP interop assemblies).\n\n```powershell\ngit clone --recursive https://github.com/itsloopyo/sons-of-the-forest-headtracking\ncd sons-of-the-forest-headtracking\npixi run build\npixi run package\n```\n\nOutput: `release/SonsOfTheForestHeadTracking-v\u003cversion\u003e-installer.zip`.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Credits\n\n- Sons of the Forest by Endnight Games\n- [BepInEx](https://github.com/BepInEx/BepInEx) - IL2CPP mod loader\n- [HarmonyX](https://github.com/BepInEx/HarmonyX) and [Il2CppInterop](https://github.com/BepInEx/Il2CppInterop) - runtime patching and IL2CPP interop, loaded via BepInEx\n- [OpenTrack](https://github.com/opentrack/opentrack) - head tracking protocol\n\n## Disclaimer\n\nThis mod is not affiliated with, endorsed by, or supported by Endnight Games. Use at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsloopyo%2Fsons-of-the-forest-headtracking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsloopyo%2Fsons-of-the-forest-headtracking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsloopyo%2Fsons-of-the-forest-headtracking/lists"}