March 2018
Beginner
274 pages
6h 1m
English
You may notice an issue if you live above 500 meters above sea level. This issue happens because our AR camera is fixed at 500 meters altitude. The problem is that we have our AR camera at a fixed height; we now need to adjust that based on the camera's altitude. Open back up the editor and complete the following:
using System.Collections;using System.Collections.Generic;using UnityEngine;namespace Packt.HoloCore{ public class SceneCameraMover : MonoBehaviour { void Awake() { var altitude = SceneController.Instance.position.GetAltitude(); transform.position = new Vector3(0f, (float)altitude, 0f); } }}
Read now
Unlock full access