webcam-headtrack

disconnected gesture demo →
  1. Run the bridge on this PC — Windows: py -3 bridge.py · macOS/Linux: python3 bridge.py. (Not python bridge.py on Windows — see “Get the bridge”.)
  2. Start camera below and allow webcam access.
  3. OpenTrack: Input = UDP over network (port 4242), Output = your game.
  4. Tune the axes, Recenter, and save a preset.

Status: disconnected bridge not reached · connecting trying (start the bridge) · streaming sending pose. A console ws://127.0.0.1:8765 failed just means the bridge isn’t up yet — it retries.

Your video never leaves this device. Only six pose numbers are sent, and only to your own PC over ws://127.0.0.1.

camera off
mode:
track:
live output0 Hz
in = smoothed pose · bar/out = value sent to the game
Gesture actions & head-mouse (advanced)

⚠ This can send keystrokes and mouse movement to your PC. It only works if you start the bridge with --actions (off by default). Use at your own risk — nothing fires unless you both enable that flag and map a gesture.

Map a gesture to a key — click "set key", then press the key (enable body/hands tracking for those gestures):

Get the local bridge

Run this on your gaming PC (needs Python 3.8+, no install). Start it from the bridge/ folder:

py -3 bridge.py      # Windows
python3 bridge.py   # macOS / Linux

On Windows, don’t use python bridge.py or bare py bridge.py — the Microsoft Store “App execution alias” intercepts them and the bridge never starts. py -3 avoids that.

It should print waiting for browser.... Then in OpenTrack pick input UDP over network (port 4242) and your usual game output.

Replicate this project locally

Download the full source and run the whole thing on your own machine.

Download git bundle

Then: npm install && npm run fetch-assets, then cd bridge && py -3 bridge.py and open http://127.0.0.1:8765/. The git bundle clones with full history: git clone webcam-headtrack.bundle.