Use Vertical Tracking in Augmented Reality Using NextNav and echo3D
Tags: augmentedreality, developertools, tutorial, cloud
Published: 2022-06-27 22:02:04

<center> 1st floor, 2nd floor, 3rd floor![](https://miro.medium.com/max/542/1*Q0cB9x0owtDhwXhrEPT7Ug.gif) </center>

[NextNav Pinnacle](https://nextnav.com/) SDK gives you precise, “floor-level” vertical positioning for any geolocation application. This is especially useful for Metaverse experiences that involve stairs, elevators, or services that require vertical triggers. Here’s how to use echo3D and [NextNav](https://partner.nextnav.com/PartnerPortalRegisterNN?startURL=/s/&utm_campaign=Echo3D%20Portal%20Registrations&utm_source=echo3d&utm_medium=landing%20page) together to build AR/VR apps that are aware of the device's elevation!

***

<center>Click on this link or scan here to see something cool! [**https://go.echo3d.co/P2kS**](https://go.echo3d.co/P2kS)

![](https://miro.medium.com/max/1144/1*w0qe1ZrwTVdKuM9NDIqsvw.png)</center>

***

Register
========

*   Register for an [echo3D](http://echo3d.co) account [here](https://console.echo3d.co/#/auth/register).
*   Register for your free [NextNav](https://partner.nextnav.com/PartnerPortalRegisterNN?startURL=/s/&utm_campaign=Echo3D%20Portal%20Registrations&utm_source=echo3d&utm_medium=landing%20page) trial [here](https://partner.nextnav.com/PartnerPortalRegisterNN?startURL=/s/&utm_campaign=Echo3D%20Portal%20Registrations&utm_source=echo3d&utm_medium=landing%20page).

Setup
=====

*   Download [Unity](https://unity3d.com/get-unity/download) and install [AR Foundation](https://docs.echo3d.co/unity/adding-ar-capabilities#1.-installing-ar-foundation) or clone [this project](https://github.com/echo3Dco/Unity-ARFoundation-echo3D-example) from GitHub.
*   In your [echo3D console](http://console.echo3D.co), download and import the latest Unity SDK through the Downloads menu on the top right corner.

![](https://miro.medium.com/max/954/1*b34LB_Jvax10UdS4lBb-Cw.png)

*   In your [NextNav](https://partner.nextnav.com/PartnerPortalRegisterNN?startURL=/s/&utm_campaign=Echo3D%20Portal%20Registrations&utm_source=echo3d&utm_medium=landing%20page) account, download and import their Unity Plugin

![](https://miro.medium.com/max/1400/1*V4gdyXbwgn7T6xqKGADX-g.png)

*   Go to the [echo3D console](https://console.echo3d.co/) and [add](https://docs.echo3d.co/web-console/manage-pages/content-page/how-to-add-content) a few 3D models.

![](https://miro.medium.com/max/1200/1*Ej527j0FyKH-Niin_tC4Ig.gif)

*   [Add metadata](https://docs.echo3d.co/web-console/manage-pages/data-page/how-to-add-data) keys called `**z-location**` to each model.

![](https://miro.medium.com/max/984/1*ofjD0Co0ICke1stpWK2Xnw.png)

Editing Code
============

*   In Unity, modify the _echo3D.cs_ script and set the two variables `**<”YOUR-API-KEY">**` and `**<”YOUR-SECRET-KEY”>**`.

![](https://miro.medium.com/max/1400/1*tgAyjOA0Jr5OoqwihJnISw.png)

*   Your echo3D [API Key](https://docs.echo3d.co/quickstart/get-api-key) will appear in the [echo3D console](https://console.echo3d.co/) once you [log in](https://console.echo3d.co/#/auth/login). Also, check your inbox for an automatic welcome email from echo3D with your key.
*   Your Secret Key can be found on the left pane of the [echo3D console](https://console.echo3d.co/), under the Security page.

![](https://miro.medium.com/max/1396/1*gFeUyioQ5VRtdpjfD96KGw.png)

*   Edit the _echo3D.cs_ script to query only for assets that include the metadata`**z-location**`. Change the`**serverURL**`to [get entries based on data](https://docs.echo3d.co/queries#get-entries-based-on-data) by adding `**&data=z-location**`.

> [https://api.echo3D.co](https://api.echo3D.co)/query?key=<API\_KEY>&secKey=<SECRET\_KEY>**&data=z-location**

*   Change the script to use NextNav’s SDK to set the value of `**z-location**` based on the device’s location.

Run
===

*   [Build and run the AR application](https://docs.echoar.xyz/unity/adding-ar-capabilities#4-build-and-run-the-ar-application) through Unity.

Learn More
==========

Refer to our [documentation](https://docs.echo3d.co/) to learn more about how to use Unity and echo3D.

Support
=======

Feel free to reach out at [support@echo3d.co](mailto:support@echo3d.co) or join our support channel on [Slack](http://go.echo3d.co/join).

Screenshots
===========

First floor

![](https://miro.medium.com/max/1400/1*HgBb5Q9qmTahMBM5PbmWyg.png)

Second floor

![](https://miro.medium.com/max/1400/1*lnedn0Gp9m74f9UaPYjdQw.png)

Third floor

![](https://miro.medium.com/max/1400/1*qmDLRyLJ4DG284_PYZpRnw.png)

Try it out and sign up for [echo3D](http://www.echo3d.co) and [NextNav](https://partner.nextnav.com/PartnerPortalRegisterNN?startURL=/s/&utm_campaign=Echo3D%20Portal%20Registrations&utm_source=echo3d&utm_medium=landing%20page) here:

*   Register for an [echo3D](http://echo3d.co) account [here](https://console.echo3d.co/#/auth/register).
*   Register for your free [NextNav](https://partner.nextnav.com/PartnerPortalRegisterNN?startURL=/s/&utm_campaign=Echo3D%20Portal%20Registrations&utm_source=echo3d&utm_medium=landing%20page) trial [here](https://partner.nextnav.com/PartnerPortalRegisterNN?startURL=/s/&utm_campaign=Echo3D%20Portal%20Registrations&utm_source=echo3d&utm_medium=landing%20page).

More Tutorials
==============

To learn how to make echo3D projects, try one of these:

*   [Make a Valentine’s Day Slideshow in AR (No code)](https://medium.com/echo3d/make-a-valentines-day-slideshow-in-ar-free-and-no-code-c1e35a4206d4)
*   [Get a Quarantine Dog…in AR! (No Code and Free)](https://medium.com/echo3d/get-a-quarantine-dog-in-ar-8383ea55376b)
*   [Quick and Easy AR Retail Apps with echo3D!](https://medium.com/echo3d/quick-and-easy-ar-retail-apps-with-echo3d-12640e21e5d9)
*   [How to Create 3D Content and See It In AR (No Code and Free)](https://medium.com/echo3d/how-to-create-3d-content-and-see-it-in-ar-free-no-coding-required-369e5b4a4b3e)

***

>_**echo3D** ([www.echo3D.co](http://www.echo3d.co/); Techstars 19’) is a cloud platform for 3D/AR/VR that provides tools and network infrastructure to help developers & companies quickly build and deploy 3D apps, games, and content._

![](https://miro.medium.com/max/1400/1*cNrRDT0JEpkcy-zG6KBNgw.png)