Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 1.38 KB

README.md

File metadata and controls

65 lines (42 loc) · 1.38 KB

Computer Vision - Game Controller

Game controller using webcam made with computer vision - Python and openCv

alt text

Requirements

Install requirements:

pip install -r requirements.txt

Get Started

python gameController.py

Actions

Keys

keys = {
    'A': pynput.keyboard.KeyCode.from_char('a'),  
    'D': pynput.keyboard.KeyCode.from_char('d'),  
    'W': pynput.keyboard.KeyCode.from_char('w'),  
    'S': pynput.keyboard.KeyCode.from_char('s'),  
}

⬅ A => Left

  • Pressed when angle is positive

➡ D => Right

  • Pressed when angle is negative

⬆ W => Front

  • Pressed when mass is bigger than 5000

⬇ S => Back

  • Pressed when mass is less than 3000

Steering wheel

You can use this image to control your car (or horse):

Volante

Image avaiable on ./images/steeringwheel.jpeg


developed by Jean Jacques and Gabriel Petillo