Quantcast
Channel: maps for developers - Medium
Viewing all articles
Browse latest Browse all 2230

Defending SF against aliens with Unity + ARKit

$
0
0

By: Lauri Rustanius

Lauri Rustanius is a professional skater turned AR game designer out of Helsinki, Finland. He continues to push the boundaries of AR gameplay and mixed reality environments using our tools, and he’s the newest member of our Unity team.

Recently, I was invited to San Francisco to visit the Mapbox office. I worked with the team to build a demo showing what’s possible with the Maps SDK for Unity.

Naturally, we imagined a spaceship flying over San Francisco — but how would the city defend itself? Using Mapbox building data that’s accessible in the Maps SDK for Unity, we mapped turrets to real-life buildings right in front of Mapbox’s SF office. This caused the aliens to retreat, ensuring the safety of San Francisco and the entire human race — it was a productive visit.

Making this demo is actually relatively easy with the current setup. Using the experimental build that Mapbox provides we can “anchor” augmented reality experiences to real-world coordinates. I used the Manual Synchronization scene in the build to align the buildings correctly for occlusion.

For debugging, I added transparent shaders (Unity provides these off-the-shelf) to the building meshes. Also, there are rocking occluding shaders to make it seem like the spaceship is actually above the building.

After getting the initial position, we moved the buildings manually to match the real world position. For now, we don’t rely on automatic tracking due to device accuracy limitations. Once we were happy with the alignment, we placed turrets along the building surface. The turrets are on patrol mode; as soon as they see the spaceship, they open fire.

Overall, we are just scratching the surface of what can be done with location data when combining the power of Unity and ARKit. It really is amazing. I highly recommend to at least play around with the Maps SDK for Unity and the Mapbox Unity + ARKit library. The latest version supports a node editor and comes with a lot of example scenes to help you get started.

lauri (^ー^)ノ (@lingoded) | Twitter


Defending SF against aliens with Unity + ARKit was originally published in Points of interest on Medium, where people are continuing the conversation by highlighting and responding to this story.


Viewing all articles
Browse latest Browse all 2230

Trending Articles