Placing SolarSystem in the real world

The next thing we'll do is let you regenerate the anchor position of the solar system. The plan is when you touch the screen of your iPhone or iPad device, the app calculates a likely position you are indicating in real-world 3D coordinates. We'll move the root position there. We will do this with a script named SolarSystemHitHandler:

  1. In your Scripts folder, create a new C# script named SolarSystemHitHandler.
  2. Drag it to the SolarSystem object as a component.
  3. Then, open the script for editing as follows:
File: SolarSystemHitHandler.csusing System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.EventSystems;using UnityEngine.XR.iOS;public class SolarSystemHitHandler : ...

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.