GithubHelp home page GithubHelp logo

wosk1947 / lightgun Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 1.0 61.6 MB

AR LightGun app

License: GNU General Public License v3.0

C# 99.75% GLSL 0.25%
augmented-reality augmented-reality-applications lightgun controller motion-control huawei huawei-ar

lightgun's Introduction

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)

lightgun's People

Contributors

wosk1947 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

cjpxyz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.