Script that converts mouse movement into joystick movement for a VR treadmill.
This version adds some more features, including:
- Raw mouse input to avoid locking the mouse or hitting the edge of the screen
- Various input smoothing methods
- Sensitivity remapping and visualization
- Config saving and loading
You can install with pip or uv. If you're going to develop, use uv, but it's not required.
I recommend astral's uv, a fast package manager that can be used as a compatible drop-in replacement for pip. It can take full advantage of the pyproject file for developers.
uv venv --python 3.13
uv pip install -e .Activate this new environment:
# Windows
./venv/Scripts/activate
# MacOS/Linux
source .venv/bin/activateAfter installing a suitable python 3, make sure you have that python set as your python alias, and run:
python -m virtualenv .venvActivate this new environment:
# Windows
./venv/Scripts/activate
# MacOS/Linux
source .venv/bin/activateInstall the package:
pip install -e .python -m vr_treadmillWarning
In theory you could run this script without installing as a package but I don't plan to support this so if it doesn't work when you run the main file directly don't complain, just read the readme.
Raw input mode is highly recommended, but I've only built this feature for windows so far.
While running in non-raw input mode, you can press the recenter toggle key to free your mouse for setting up controls. (Default is F9)