Fusion Cross-platform Mixed Reality
Overview
This sample demonstrates how to prepare an application allowing both Apple Vision Pro and Meta Quest's users to share a multiplayer session.
Apple Vision Pro users can use an immersive space, similar to the Meta Quest's user experience, or see the scene from a bounded volume, to have an overview of all the users from above.
The use case allows users to build little building with small blocks, coming from Kenney's modular buidling asset.
Users can find these blocks in a menu that appears when they look at their hand.
The blocks are magnetics on the top and side, so that they stick to each other.
The detected horizontal planes (tables, ...) in the real room of the user are magnetic too, allowing to place the building blocks on them.
For Apple Vision Pro user, the menu allows them to go to a bounded volume mode, to see the room from above in a bounded volume, that can coexist with other apps in visionOS shared space.
Cross-platform
This sample is compatible with both Apple Vision Pro and Meta Quest headset devices.
The visionOS helpers tools provided in the sample ensure that the proper adaptations are done on visionOS, such as support for indirect pinch.
Mixed reality
This sample is focused on mixed reality, with passthrough and plane detection.
The local user surfaces are detected, and they can place the building blocks on it. Note that the detected surface are not synchronized, they are only visible for the user having detected them.
Note for Meta Quest:
Currently, the user has to do a Room setup in the Quest operating system's settings first, for real life planes to be detected.
visionOS capabilities support
Objects can be grabbed with a direct pinch on all platforms, or with indirect pinch on visionOS.
On visionOS, the user can switch from bounded volume to unbounded volume while the app is launched. The body parts renderer will vanish for other users while in bounded volume mode.
Technical Info
- This sample uses the Shared Mode topology,
- The project has been developed with Unity 2022.3, Fusion 2, Photon Voice 2.54, Polyspatial 1.0.3
Before you start
To run the sample :
Create a Fusion AppId in the PhotonEngine Dashboard and paste it into the
App Id Fusion
field in Real Time Settings (reachable from the Fusion menu).Create a Voice AppId in the PhotonEngine Dashboard and paste it into the
App Id Voice
field in Real Time SettingsThen load the
MainScene
scene and pressPlay
Download
Version | Release Date | Download | |
---|---|---|---|
2.0.0 | May 14, 2024 | Fusion Cross Platform Mixed Reality 2.0.0 Build 542 |
Folder Structure
The main folder /CrossPlatformMR
contains all elements specific to this sample.
The /Photon
folder contains the Fusion and Photon Voice SDK.
The /Photon/FusionAddons
folder contains the XR Addons used in this sample.
The /XR
folder contains configuration files for virtual reality.
Used Fusion XR addons
We provide for free some reusable addons to speed up 3D/XR application prototyping.
Here are the addons we've used in this sample.
visionOS Helpers
The visionOS helpers addon addresses some specificities of the visionOS platform.
It makes the indirect pinch compatible with XRShare grabbing, provides tools to synchronize the bounded/unbounded Polyspatial's state, and also offers some cross-platform tools, like a LineRenderer
replacement or helpers to mimic visionOS windows behavior in Unity.
XRHands synchronization
The XRHands synchronization addon shows how to synchronize the hand state of XR Hands's hands (including finger tracking), with high data compression.
It also provides some helpers classes to detect gestures (pinching, grabbing, ...)
Voice helpers
The Voice Helpers addon provides some components to help set up Photon Voice for a Fusion XR project.
XRShared
The XR shared offers the core of the rig parts sycnhronization logic, as well as basic interaction capabilities such as grabbing.
ConnectionManager
The ConnectionManager
addon manages the connection launch and spawns the user representation.
See ConnectionManager Addons for more details.
ExtendedRigSelection
This addon allows to switch between the various rigs required in this sample. Indeed, 3 configurations are included in this sample :
- VR rig for Meta build,
- AVP Unbounded mode for the apple vision Pro build (when starting in unbounded mode - the default one),
- AVP bounded mode for the apple vision Pro build (when starting in bounded mode - suggested as an alternative),
See Extended Rig Selection Industries Addons for more details.
Magnets
The Magnets addon shows a simply way to attract an object to other ones when ungrabbed.
Third party components
- Oculus Sample Framework hands
- Kenney's modular buidling asset.
- Sounds