How It Works
The protocol:- Connects to the vJoy virtual joystick driver
- Maps your 6 head tracking axes (X, Y, Z, Pitch, Yaw, Roll) to 6 joystick axes
- Scales values to fit joystick axis ranges
- Updates the virtual joystick in real-time as you move your head
Axis Mapping
OpenTrack maps tracking data to these HID joystick axes:| Tracking Axis | Joystick Axis | HID Usage |
|---|---|---|
| X Position | X | HID_USAGE_X |
| Y Position | Y | HID_USAGE_Y |
| Z Position | Z | HID_USAGE_Z |
| Pitch | RX (Rotation X) | HID_USAGE_RX |
| Yaw | RY (Rotation Y) | HID_USAGE_RY |
| Roll | RZ (Rotation Z) | HID_USAGE_RZ |
Prerequisites
vJoy Driver Installation
Download vJoy
Download the vJoy driver from:
- Official site: http://vjoystick.sourceforge.net/
- SourceForge: https://sourceforge.net/projects/vjoystick/
Run installer
Run the vJoy installer and follow the setup wizard.Important: Install as administrator.
Configure vJoy device
After installation, run Configure vJoy from the Start menu:
- Select Device 1
- Ensure these axes are enabled:
- X, Y, Z
- RX, RY, RZ
- Click Apply
Setup Instructions
Select Virtual Joystick protocol
In OpenTrack, go to the Output dropdown and select “Joystick emulation — vjoystick”.
Start OpenTrack
Click Start in OpenTrack. The protocol will:
- Connect to vJoy device #1
- Query axis ranges
- Begin sending joystick data
Configure game controls
In your game’s control settings:
- Look for view control or camera options
- Bind view axes to the virtual joystick axes:
- View left/right → Joystick RY (Yaw)
- View up/down → Joystick RX (Pitch)
- View roll → Joystick RZ (Roll)
- View forward/back → Joystick Z
- View left/right position → Joystick X
- View up/down position → Joystick Y
- Adjust sensitivity and dead zones as needed
Configuration
Axis Value Ranges
The protocol automatically scales tracking data to joystick axis ranges: Position axes (X, Y, Z):- Input range: ±50 cm
- Output: Scaled to joystick axis min/max
- Input range: ±180°
- Output: Scaled to joystick axis min/max
Value Scaling Formula
Use Cases
Games Without Native Head Tracking
Many games support joystick input but not head tracking. Examples:- Racing games (camera movement)
- Flight arcade games
- Mech games (torso twist)
- First-person games (view control)
View Control Schemes
Cockpit games:Hybrid Input
Combine virtual joystick with physical controls:- Use mouse/gamepad for aiming
- Use head tracking for view/camera
- Map only needed axes to avoid conflicts
Troubleshooting
”vjoystick won’t work without the driver installed”
Cause: vJoy driver not installed. Solution:- Download vJoy from sourceforge.net/projects/vjoystick
- Run installer as administrator
- Restart OpenTrack
”Virtual joystick already in use”
Cause: Another application has acquired vJoy device #1. Solution:- Close other applications that might use vJoy
- Check Task Manager for vjoy-related processes
- Restart computer if needed
- Ensure OpenTrack starts before other joystick applications
”Device missing. Add joystick #1”
Cause: vJoy device #1 not configured. Solution:- Run “Configure vJoy” from Start menu
- Ensure Device 1 exists and is enabled
- Enable axes: X, Y, Z, RX, RY, RZ
- Click Apply
- Restart OpenTrack
Game Doesn’t Detect Joystick
Symptoms: vJoy works in OpenTrack but game doesn’t see it. Solution:- Test in Windows: Control Panel → Devices → Game Controllers
- vJoy Device should appear
- Right-click → Game controller settings → Properties
- Move your head and verify axes move
- Restart game: Some games only detect joysticks at startup
- Check game settings: Ensure joystick input is enabled
- Update game: Some older games don’t support modern HID devices
Wrong Axis Mapping
Symptoms: Moving head left/right rotates camera up/down. Solution:- Check game control bindings
- Different games map RX/RY/RZ differently
- Try swapping axis assignments in game settings
- Use OpenTrack axis mapping to reassign before sending to joystick
Axis Moves But View Doesn’t Center
Cause: Game expects spring-centered joystick. Solution:- In OpenTrack mapping, enable “Center” for position axes
- Adjust dead zone in game settings
- Some games aren’t suitable for head tracking via joystick
Jittery or Jumpy Movement
Cause: Insufficient smoothing or low update rate. Solution:- Increase filter smoothing in OpenTrack
- Adjust game joystick sensitivity
- Enable joystick dead zones in game
- Check input device tracking quality
Advanced Configuration
Partial Axis Usage
You don’t need to use all 6 axes. Common configurations: Rotation only (3DOF):- Map only Pitch, Yaw, Roll
- Leave position axes at center
- Good for games with fixed camera position
- Map only X, Y, Z
- Use for body lean in racing games
- Keep rotation centered
vJoy Multi-Device
If you need multiple virtual joysticks:- Configure additional vJoy devices (Device 2, 3, etc.)
- OpenTrack uses Device 1 only
- Use other devices for different applications
- Avoid device conflicts
Game-Specific Profiles
Create OpenTrack profiles for different games:- Save profile with game name
- Configure axis mappings per game
- Set appropriate ranges and curves
- Use profile shortcuts for quick switching
Technical Details
vJoy API Functions
Device Status Codes
| Status | Description | Action |
|---|---|---|
VJD_STAT_OWN | Already owned | Bug - should not happen |
VJD_STAT_FREE | Available | Normal - acquire device |
VJD_STAT_BUSY | In use | Close other app |
VJD_STAT_MISS | Not configured | Run Configure vJoy |
VJD_STAT_UNKN | Unknown error | Reinstall driver |
Axis ID Constants
Update Rate
The protocol updates the virtual joystick at the same rate as OpenTrack’s main loop:- Typically 50-60 Hz depending on input device
- No artificial rate limiting
- Games poll joystick at their own rate
The Virtual Joystick protocol is most useful for games without native head tracking support. For games with FreeTrack support, use the FreeTrack protocol directly for better performance and lower latency.
Alternatives
For games that support other input methods:- FreeTrack support: Use FreeTrack protocol (better performance)
- Mouse emulation: Use MouseLook or FreePIE scripts
- UDP output: Send data to custom game mods
- OSC protocol: Control games via Open Sound Control