FaceToJoystick is a tool allowing you to use your head as a joystick, similiar to opentrack but more compatable with linux.
- Python 3.x
- OpenCV (
opencv-python
package) - Numpy
- vgamepad library (for virtual joystick control)
- Webcam (built-in or external) for capturing facial movements
- Clone the repository to your local machine:
git clone https://github.com/PeaceNira/FaceToJoystick.git
- Install the required Python packages:
pip install opencv-python vgamepad numpy
- Connect your webcam to your computer.
- Run the
main.py
script:
python main.py
-
Position your face in front of the webcam.
-
Look left, right, up, or down to control the virtual joystick.
-
Press the 'r' key to reset the initial face position if needed.
-
Press the 'q' key to exit the program.
-
The X output is Controller axis 4, and the Y output is axis 5.
-
Constants contain options you can edit to your desire, or when the application is launched via the GUI.
Contributions are welcome and am hoping to build this project into a good linux alternative to opentrack.
This project is licensed under the MIT license. See the LICENSE file for details.