This document is about: FUSION 2
SWITCH TO

XRIT Integration

Fusion XR prototyping addons

This addons allows to use Unity XR Interaction Toolkit in a multi-user contexte.
The aim is to provide an easy to use XRIT support for basic features (we haven't attempted to support all XRIT features).

The addon has been developed and tested with Unity XRIT v3.0.8.

Implementation

To build this addon we use some Unity prefabs provided in the Unity Hands Interaction Demo samples.

Rig

In a XR context, local users movements and interactions are managed by a rig. We called it hardware rig.
In the Unity scene, the hardware rig game object manages the user devices (headset, controllers) and allows to support features like hands tracking and interactions with objects.
Some modifications must be done in the default Unity XRIT rig (XR Origin Hands (XR Rig) prefab) to be able to use it in a multi-user context.
Indeed some hardware information (like head and hands position) must be synchronized over the network with the network rig that represent the local user.

All XRIT rig modifications are managed at runtime by a single script provided in this addon : XRITHardwareRig. This class is in charge :

  • to detecte the XRIT rig parts (hands, controller, camera),
  • to add associated prefabs or class,
  • to manage controller & hand vizualization mode (they can be visible or not according to the connection status),

This XRITHardwareRig class must be added to the XRIT XR Origin rig component of the XR Origin Hands (XR Rig) prefab.

We provide a ready to use prefab called XRITHardwareRig.

Grabbing

To synchronize the grabbing interaction for remote users, it is required to add the XRIT Network Grabbable class on grabbable objects.
It should be placed next to a XRGrabInteractable component. It listens to the selectEntered and selectExited events to know when the obect it grabbed.
When the local user tries to grab an object, XRIT Network Grabbable class requests state authority it the user doesn't have it, and the objet follows the grabbing rig part movements.

ParentingMode

The ParentingMode parameter can be used to configure the parenting according to the grabbable object location into the scene hierachy.

  • UnparentAtStart : it disables the NetworkTransform SyncParent parameter and unparent the grabbable at start if stored under a non-networked object. The parenting it not restored when the object is ungrabbed.
  • AutoFixparenting : it disables the NetworkTransform SyncParent parameter and fix parenting on authority changes. This mode will ensure that grabbed objects have no parent, and ungrabbed object restore their initial parent (as detected during awake). This mode is mostly relevant for scene network objects, that are stored under non-networked objects.
  • NetworkSync : it doesn't change the parenting and enable Fusion NetworkTransform synchronize parent feature. Use with care because it is not fully tested due to XRIT internal logic.

Demo

A demo scene can be found in Assets\Photon\FusionAddons\XRITIntegration\Demo\Scenes\ folder.

This demo scene is a ready-to-use modified version of the Unity XRIT Starter demo scene.

Dependencies

  • XRShared addon

Download

This addon latest version is included into the Industries addon project

Supported topologies

  • shared mode

Changelog

  • Version 2.0.0: First release
Back to top