Giter Site home page Giter Site logo

imclab / sharedspheres Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unity-technologies/sharedspheres

0.0 2.0 0.0 10.83 MB

An example project to demonstrate an AR shared multiplayer experience using Unity ARKit Plugin for ARKit 2 and UNet

License: Other

C# 82.53% ShaderLab 1.91% Objective-C++ 13.25% Objective-C 2.31%

sharedspheres's Introduction

SharedSpheres - AR Multiplayer Experience

We want to showcase an example of two or more devices being able to share an augmented reality experience in the same space.

ARKit 2 introduced the notion of ARWorldMap which allow you to share your coordinate space with another device while interacting in AR. We use Unity ARKit Plugin to interact with ARKit 2 SDK, but we needed a mechanism to transmit the ARWorldMap between devices.

The solution for local multiplayer we settled on for this example is CaptainsMess by the inimitable Spaceteam.

This app is created with a combination of the two projects mentioned above. We start off with a scene that maps the area around your device to obtain the ARWorldMap for the area you are going to play in.

Then we go to a scene which contains the lobby (as implemented by CaptainsMess example) so that we can connect up the devices. You can choose to autoconnect or choose one device to be the host and others to be clients. Once they are connected, the host device will send its ARWorldMap to all the clients, who will all relocalize to the host device's coordinate system.

Since the ARWorldMap can be hundereds of kilobytes, and UNet does not have a mechanism to transmit large messages or files like that, we divvy them up into smaller chunks using a mechanism found here.

We also implement a sphere prefab that is registered by UNet so that it can be spawned on all clients at the same time. Then when we press a button on one client, it generates a sphere prefab of a certain color which is different from the color of the spheres generated by other clients.

Go check it out!

sharedspheres's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.