Game Controls - Sowbhagya-lakshmi/2D-Paramotoring-Pygame GitHub Wiki

The Paramotoring Game consists of 2 modes for controlling the player's movement.

  • Mouse Control
  • Hand Gesture Control

MOUSE CONTROL

Controlling the movement of the player by moving the mouse as desired.

Mouse-control

HAND GESTURE CONTROL

Controlling the movement of the player by moving the hand considering the top point of the index finger as reference.

How it is done?

Hand Gesture Recognition is performed in the game by using a prebuilt Python package Mediapipe.

Mediapipe Hands tracks the gesture of the hand and returns 21 3D-Hand landmarks depicting the pose of the hand. When the hand is placed in the vision of the camera, the player's movement is accessed only when the index finger is up and all others are down. And then the movement of the topmost point of the index finger is considered for controlling the player's movement.

Gesture-Control

Reference for Hand Gesture Recognition: https://www.youtube.com/watch?v=8gPONnGIPgw&t=823s