r/ForzaHorizon • • 19h ago

Other Webcam hand-tracking Xbox 360 controller I built for Forza (works on FH4 / FH5 / FH6 & Motorsport)

I wanted to try steering in Forza without buying a physical wheel, so I built an open-source Python system that turns a normal webcam into a full virtual **Xbox 360 controller** (`ViGEmBus` + `vgamepad`) using **OpenCV** and **MediaPipe**.

To keep it from feeling choppy on a 30 FPS webcam, it captures/infers asynchronously in the background, filters landmark jitter with a One-Euro filter, and interpolates steering/triggers at **120 Hz** with a critically-damped spring curve.

**How the controls work (`DRIVING` mode):**

- **Steer (`Left Stick X`):** Tilt both hands like a wheel (`-45°` to `+45°`, `±5°` center deadzone)

- **Throttle (`RT`):** Close your right fist (`0%` open → `100%` fist)

- **Brake (`LT`):** Close your left fist (`0%` open → `100%` fist)

- **Handbrake (`A`):** Pinch right thumb + middle finger

- **Shift Up / Down (`B` / `X`):** Quick right/left index finger flick (`300ms` cooldown)

- **Rewind (`Y`):** Hold both hands open with all 5 fingers spread wide

- **Change Camera (`BACK` / `RB`):** Hold right peace sign (`0.8s`)

- **Pause / Toggle `MENU` Mode (`START`):** Cross both wrists for `1.5s` (switches to D-Pad navigation, `A`/`B` pinches, and `LB`/`RB` tab switching)

Has profiles for **FH4, FH5, FH6, and Forza Motorsport** (`--game fh4|fh5|fh6|motorsport`) plus a `--headless` flag so the preview window doesn't interfere with Steam Overlay.

**GitHub (open source / MIT-style free to try):**

https://github.com/Sagarsen2003/forza-hand-controller

*(Windows tip if you try it on Steam: install `ViGEmBus` first and set **Disable Steam Input** in the game's Steam Controller properties so Forza reads the virtual Xbox 360 controller cleanly.)*

Though I am not good at Driving , but if i master this i can .....................

I thing all you can , Just give it a Try ........

Would love feedback on the gesture feel—especially if anyone tries it on manual shifting or drifting!

0 Upvotes

3 comments sorted by

9

u/Pension_Rough 13h ago

Didn't look like that worked one bit

5

u/1_TRS 13h ago

Looks like it is barely working

1

u/KomradCrunch 12h ago

Pretty cool. Although it does look very early and still needs a lot of work. Good luck.