explaingit

haritha99ch/horizonhaptics

11PythonAudience · generalComplexity · 2/5Setup · moderate

TLDR

A Python app that reads live physics data from Forza Horizon 6 over the network and translates it into realistic trigger resistance and vibration on a PlayStation 5 DualSense controller, including ABS pulses, traction loss, turbo boost, and road texture.

Mindmap

mindmap
  root((horizonhaptics))
    What it does
      Trigger resistance
      Vibration effects
      Road texture feedback
    Trigger effects
      R2 throttle G-force
      L2 braking and ABS
      Gear change pulses
      Collision jolts
    How it works
      UDP telemetry input
      Python processing
      DualSense USB output
    Setup
      Enable Data Out in game
      Run launcher script
      Settings panel tuning
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add DualSense trigger haptics to Forza Horizon 6 on PC so the controller responds to acceleration G-force, braking pressure, and wheel slip.

USE CASE 2

Feel ABS activation pulses and handbrake lock in your brake trigger while driving in Forza Horizon 6.

USE CASE 3

Tune individual haptic effects through the settings panel, adjusting resistance strength, vibration frequency, and smoothing, without restarting the app.

Tech stack

Python

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Python 3.13 or later and Forza Horizon 6 with UDP Data Out enabled in the game's HUD and Gameplay settings.

In plain English

HorizonHaptics is a small Python application that adds realistic trigger resistance and vibration to a PlayStation 5 DualSense controller when playing Forza Horizon 6 on PC. The game already sends out live physics data over the network via a feature called UDP telemetry, and this app reads that data and translates it into trigger effects in real time. The effects cover a range of driving situations. The throttle trigger (R2) builds resistance based on how hard you are accelerating in G-forces, vibrates when the wheels lose grip, adds extra resistance when a turbo boost is active, and gives a hard jolt on collision. The brake trigger (L2) gets progressively firmer as you press harder, locks up rigidly when the handbrake is pulled, and pulses during ABS activation when wheels are about to lock. Both triggers pick up road surface texture and rumble strips as a background idle effect, and both vibrate briefly on gear changes. Each effect category has its own mode setting (off, resistance only, or full vibration) so you can tailor the feel. Setting it up involves two steps. First, inside Forza Horizon 6 you go to the HUD and Gameplay settings and turn on Data Out, pointing it at your PC's IP address and port 5300. Second, you run a launcher script (run.sh on Linux or run.bat on Windows) which installs the necessary Python packages automatically and starts the app's graphical settings window. You connect the DualSense controller via USB (Bluetooth also works). From that point the app runs in the background while you play, showing a status indicator when it is successfully receiving game data. The settings panel lets you tune every aspect of the effects without restarting. You can adjust resistance strength, vibration frequencies, smoothing speed, grip loss thresholds, and per-effect intensity. All settings save automatically. The app requires Python 3.13 or later, which the launcher manages for you, and it works on both Linux and Windows.

Copy-paste prompts

Prompt 1
I set up HorizonHaptics and enabled Data Out in Forza Horizon 6 pointing to port 5300, but the app shows no incoming data. What should I check?
Prompt 2
Explain how HorizonHaptics translates G-force data from Forza Horizon 6's UDP telemetry into DualSense L2 and R2 trigger resistance values.
Prompt 3
I want to adapt HorizonHaptics for a different game that also outputs UDP telemetry. Which parts of the Python code handle data parsing and effect generation?
Prompt 4
Which HorizonHaptics settings give the most realistic braking feel on tarmac circuits versus dirt rally stages in Forza Horizon 6?
Open on GitHub → Explain another repo

← haritha99ch on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.