Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opentrack-constant-autocenter

opentrack doesn't auto-recenter on its own — you press a key, it centers once, and from there any drift in your tracker just accumulates until you press it again. TrackIR5's own software has a constant auto-center behavior built in, but you lose that the moment you route TrackIR5 through opentrack instead of the official app (which most people do, since opentrack's filtering, curves, and protocol support are better).

This is opentrack master with PR #2186 (constant auto-centering, by JUHASZ Peter Karoly) backported, since it's currently unmerged upstream and bundled with an unrelated neuralnet-tracker change I didn't need. The patch here is just the generic auto-centering part, which lives in opentrack's core pipeline (logic/pipeline.cpp) and therefore works with any input tracker, not just whatever the original PR targeted — webcams, IMUs, the UDP/FreePIE input, and TrackIR5 bridged in over UDP.

I don't own a TrackIR5, so this is built and patch-verified but not tested against real hardware. If you try it, open an issue with what worked or didn't.

What it does

A "Constant auto-center" checkbox shows up next to "Center at startup" in opentrack's settings, with a speed spinbox (units/second — degrees for rotation, whatever position unit you've set for translation). With it checked, and the centering method set to anything other than Disabled:

  • Every tracking frame, each axis's distance from the current center point is checked.
  • Past a small deadzone, the center point gets nudged toward your current head position, capped at speed × dt per frame.
  • Net effect: a smooth, continuous pull back toward center instead of a one-shot hotkey action.

It's a no-op while you're actively holding/pressing the center key, and skipped entirely for trackers that already implement their own centering logic.

Installation

Grab the portable build from Releases, unzip, run opentrack.exe. No installer.

If you'd rather build it yourself (or apply the patch to a different opentrack version/checkout), see BUILDING.md.

Using it

  1. Get pose data into opentrack from a tracker — see docs/trackir5-setup.md for the TrackIR5-specific bridge.
  2. Options (gear icon) → main settings tab.
  3. Centering method: anything other than "Disabled" (opentrack defaults to "Roll compensated", which is fine).
  4. Check Constant auto-center, set a speed. Start around 0.1–0.3 units/sec and tune from there — too fast fights intentional head movement, too slow doesn't correct drift fast enough.

Repository layout

Path What
patches/0001-constant-auto-center.patch Unified diff against current opentrack master — 5 files, apply with patch -p1 or git apply
docs/trackir5-setup.md TrackIR5 → opentrack bridge setup (FreePIE or GlovePIE)
scripts/glovepie_relay.py OSC-to-opentrack UDP relay (Python 3), for the GlovePIE path
examples/trackir_to_opentrack.PIE Example GlovePIE script that feeds the relay
BUILDING.md Build instructions (CMake + Qt6 + MSVC)

License

opentrack is distributed under a permissive ISC-style license — see LICENSE. The patch, relay script, and documentation in this repo are released under the same terms.

About

opentrack with backported Constant auto-center (PR #2186) adapted to work with TrackIR5 bridging

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages