Depth illusion by 3D head tracking on iPhone X
Switch branches/tags
Nothing to show
Clone or download
Latest commit fd76a34 Mar 24, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
Assets v1.3 improved Vibranium Mar 24, 2018
ProjectSettings v1.3 improved Vibranium Mar 24, 2018
UnityPackageManager initial commit Mar 1, 2018
.gitignore git ignore directive Mar 1, 2018
LICENSE updated license with 2 new scenes Mar 24, 2018 Removed ARKitSettings.asset from project and added instruction in REA… Mar 24, 2018


Depth illusion by 3D head tracking and off-axis projection on iPhoneX

Uses Unity, UnityARKitPlugin and Xcode 9.2

Project made in Unity 2017.3.0f3

gif gif

Note that this is a monoscopic effect. When using the app IRL, the illusion is best seen with ONE EYE - the other eye closed. (Also works great for video since video is monoscopic). For a stereo effect some type of glasses would be needed (anaglyph or active) and the app adapted for it.

Info on method and code: TheParallaxView Article

Detailed Build Instructions

  1. Clone or download the repository
  2. Make sure you have the ARKitPlugin folder already on your computer. If not, open Unity and get it from the Asset Store. (This step cannot be done after opening TheParallaxView because that will overwrite the project settings when importing it). If it’s the first time using ARKitPlugin, make sure you can build the Face Tracking examples and run them on the device.
  3. Copy the ARKitPlugin folder into TheParallaxView/Assets
  4. Start Unity and open the TheParallaxView
  5. Check "ARKit uses Face Tracking" checkbox in Assets/UnityARKitPlugin/Resources/UnityARKitPlugin/ARKitSettings.asset
  6. Double-click the HeadTrack3D scene
  7. To see a good preview, set Game view to 2436 x 1125 pixels (which is iPhone Landscape resolution)
  8. File>Build Settings - select iOS and hit “Switch Platform”
  9. Click “Player Settings” and under “Other Settings”, insert your Apple Developer Signing Team ID (alternatively, select Team ID later on in Xcode)
  10. Back in the Build Settings, hit “Build”. Create a folder called “Builds”, navigate into it, then choose a name for your build such as “IOS”. Hit Save. Now an Xcode project is generated by Unity.
  11. Start Xcode 9.2 and open Unity-iPhone.xcodeproj that was created in the last step and hit Run.