GithubHelp home page GithubHelp logo

mmints / ar-game Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 63.19 MB

Mirror from https://gitlab.uni-koblenz.de/mmints/ar-game/

ShaderLab 13.67% C# 81.46% HLSL 4.15% Objective-C 0.65% JavaScript 0.06%

ar-game's Introduction

AR Game

Unity, ARToolkit, Android Deployment

  1. Download newest Unity, JDK, Android SDK, ARToolkit5 Tools, ARToolkit5 for Unity
  2. Open Project (/ ARToolkit sample scene "Standard Asset Example Project" / "CubemarkerScene")
  3. Open Unity, import ARToolkit Tools, ARToolkit Package
    • Assets->Import Package, only select those 3 Folders! screenshot1
  4. Switch Project Type to Android (File->Build Settings)
  5. Unity Edit->Preferences->External Tools set JDK Path and Android SDK Path
  6. Print example marker
  7. Build Settings -> Build (Export to game.apk)
  8. Install using Unity, Android Debug Bridge('adb install -r game.apk') or copy manually
  9. Change AR params if needed (Unity SceneGraph->ARToolKit->Inspektor, Threshold und Cutoff)
Troubleshooting
  • "unable to list target platforms": Apply Android SDK patch tools_r25.2.3-windows.zip. [Help]
  • "Plugins colliding error": delete libARWrapper.so and libc++_shared.so in PROJECT_DIR\Assets\Plugins\Android
Notes
  • According to docs, an older Unity version is compatible with ARToolkit. This is not true, new Versions are also supported
  • Known issue: Autofocus / camera resolution fix. Solution available but worse tracking?
    • dest: PROJECT_DIR\Assets\Plugins\Android\UnityARPlayer.jar
      • default Unity project path: C:\Users\Public\Documents\Unity\Projects
    • Replace this file (or move to entirely else Folder) with this
    • (Source) To solve these issues, we may want to follow the issue trackers/forum

Tips & Tricks

  • Change Object Material: Mesh Renderer -> Material -> Element 0 -> Click small far right circle
  • Asset Store allows searching for free Assets (Textures, Shaders)
  • Invisible boxes by disabling Mesh Renderer
  • Object Layer should be "AR Background 2"
  • Physically interacting Objects need "RigidBody" component
  • "Marker Scene" contains "AR Tracked Object" component, set "stay visible" in seconds (f.i. 0.05)
  • Tilt-Device-Physics requires Accelerometer C# Code Snippet
    • Script File and Class name must match

Game Object Setup

Flipper
  • Hinge Joint
    • Spring: 5000
    • Damper: 15
    • Limit Min: 0 (left), -45 (right)
    • Limit Max: 45 (left), 0 (right)
  • Flipper Controller
    • Input Button: left or right button from canvas (Canvas has to be part of the scene!)
    • Rest Position: 0 (L & R)
    • -45 (left), 45 (right)
    • Input Name: name of the input source witch is setted in the project preferences

References

ar-game's People

Contributors

pablode avatar mmints avatar janarenz avatar

Watchers

 avatar

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.