Skip to content

Wosk1947/LightGun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LightGun

The app allows you to use your android phone as a pointing device and as an arcade lightgun in particular. The app consists of two parts: client which must be installed on a phone and server which must be installed on PC. The client tracks its position and rotation using augmented reality engine, then finds a point where an imaginary line parallel to the edge of the screen intersects the surface of a monitor, then sends this point to the server via http-request. Also the client sends button presse to the server. The server puts the Windows cursor at the coordinates of intersection point and also simulates mouse and keyboard button presses. The app was tested for emulating Nintendo Wii rail shooters, specifically House of the Dead: Overkill. Currently only Huawei AR Engine being supported but can be easily converted to Google AR Core or other AR engines.

In order to run:

  1. The phone and PC must be in the same Wi-Fi network.
  2. Install client to your phone.
  3. Run server. Enter the width and height of the screen in pixels.
  4. Run app. Enter the IP adress of a PC with running server.
  5. Rotate a phone so that its screen looks to the left. Then place a phone so that it is perpendicular to the surface of the screen. Press Calibrate button. Then press Connect button.
  6. If everything is OK - the mouse cursor will start moving in correspondence with your phone. In server change the multiplier variable - this variable corresponds to
  7. the physical dimensions of the screen. Tune it until you will be satisfied with the intersection point.

ezgif com-gif-maker (6)

ezgif com-gif-maker (4)

ezgif com-gif-maker (5)