PiHead Tracker
← All news

What are the TrackIR and FreeTrack protocols, and how do games see head tracking?

When you see "TrackIR" or "FreeTrack" in a game's settings, you might think it's a brand. In fact both are protocols, a shared language games use to talk to head tracking programs. Whatever device you use, if the game understands one of these languages, head tracking works. This post explains what happens behind these protocols. It helps make sense of most head tracking problems.

The TrackIR protocol

TrackIR is NaturalPoint's infrared camera head tracking system. Over the years it became so widespread that hundreds of games added dedicated support for it. These games use an interface defined by NaturalPoint for head tracking.

The technical side works like this: when the game starts, it looks up a Windows registry entry that says where the TrackIR software is installed. It looks for a file called NPClient in that folder, loads it and reads the head angles from it. Many games check a verification string in the file when they start; apart from that, they don't care who wrote the file. They only expect it to give the right answers. Programs like PiHead Tracker provide this interface with their own files, and the game sees the device as TrackIR.

Encrypted games

Some games expect TrackIR data not in plain form but encrypted with a game-specific key. DCS World, Arma 3, the newer IL-2 Sturmovik games, Elite Dangerous and Star Citizen are a few of them. If you use a program that doesn't support the encryption, the game sees head tracking but doesn't move, or doesn't connect at all.

A good share of "program X works in one game but not in another" complaints comes down to this. PiHead Tracker supports the encryption of these games. Every game has its own ID number, and when a game connects the app uses that number both to show the game's name and to pick the right key.

The FreeTrack protocol

FreeTrack started as a free, open-source program for head tracking with a webcam. Over time its protocol spread among games too. In this protocol, the tracking program writes the head angles into a small shared area of the computer's memory and the game reads them from there. To find that area, the game again looks at a registry path and a file called FreeTrackClient.

Some games support only TrackIR, some only FreeTrack, and some both. PiHead Tracker offers both protocols at the same time. Just turn on whichever option the game has.

Why only one tracking program can run at a time

The registry path can point to only one folder. If the TrackIR software, opentrack and PiHead Tracker are all installed, the game talks to whichever program the entry points to at that moment. If two programs are open at once, each tries to claim the entry, and the game can end up connected to the wrong one.

When PiHead Tracker opens, it points this entry to its own folder, and when it closes it writes the old value back. So if you want to keep using TrackIR or opentrack, just close PiHead Tracker and your settings stay intact. Even if the app closes unexpectedly, it restores the old value from a backup.

How this helps you

  • If the game doesn't see head tracking: make sure you opened the tracking program before the game and that no other tracking program is running. The game reads the entry when it starts.
  • If the game connects but the view doesn't move: the game may be encrypted. Make sure the program you use supports that game.
  • The game has no TrackIR option but has FreeTrack: no problem, the same device works with both.
  • If the game supports neither: head tracking won't work directly in that game. We list supported games on the games page.

Whatever the protocol, the information sent to the game is the same: how far your head has turned left-right, up-down and sideways. Some systems also send head position. We explain the difference in our 3DOF vs 6DOF post.