Mobile

Sun Hacks AR Tutorial

SunHacks-AR-Tutorial

Using Unity 2018.2 and ARFoundation 1.0

This is a Unity tutorial on the forms of input (Gaze, Tap, Movement) available in mobile-device Augmented Reality. This tutorial uses ARFoundation (built on top of ARKit & ARCore) as the framework for cross platform AR.

Please install the following before importing/beginning:

The goal is to replicate this scene from Fast and Furious 7:

Fast

The intent is to create a plane that is controlled by gaze movement & physical movement. Tapping launches car’s out of the plane, holding causes the plane to rotate.

Airplane

Pretty close wouldn’t you say? 😀


Once all tools are installed, please do the following:

  • Switch Build Platform (File>Build Settings) to iOS/Android.

SwitchBuild

  • Import package included in this repo (Assets>Import Package>Custom Package, Select Package from Repo)

ImportPackage

  • Import AR Packages using Package Manager in Unity:

Window>Package Manager Install ARFoundation, ARCore XR Plugin, and ARKit XR Plugin. PackageManager

  • Enable Unsafe Code (using frameworks in pre-release):

Unsafe

Scripts:

  • ARUserInputManager

Responsible for determining user gaze, and checking for a touch-hold gesture.

  • DropCar

Responsible for instantiating a car prefab and launching it from location of AirPlane/User Gaze. Additionally instantiates a Explosion Particle System

Explosion particle system is downloaded from Unity Standard Assets.

3D Models for Tutorial downloaded via Google Poly. Models were created by Google:

References:

Author:

License

Copyright © 2018, Alireza Bahremand. Released under the MIT license.