With Mapbox maps, Unity, and Mantle you can recreate and explore any place in the world in virtual 3D. With no prior Unity experience, a drive through San Francisco’s iconic hilly streets took me a few hours to set up after work one night while having a beer.
3D geometries are created in Unity by pulling data from Mapbox’s web tiles directly into the Unity engine from our API. A decoder then uses building footprints, heights, and road data from our Streets product and elevation data from our Terrain product to create fully interactive Unity GameObjects that are styleable and scriptable.
After loading up the Mapbox data-driven 3D terrain and cityscape of San Francisco’s northeast corner with the Mantle plugin, I grabbed a car asset and controller from the Unity Asset store, dropped it into the game environment, hooked up a few physics scripts, and set a driving path.
One click to switch us into game mode, and we’re cruising over San Francisco’s Russian Hill on real world terrain, past real world buildings:
driving-sf-edited-trim from Mapbox on Vimeo.
</iframe>Excited about bringing real world maps to games? Take a look at open positions or hit me up on Twitter!