This document is about: FUSION 2

Social Distancing

Available in the Industries Circle
Fusion Industries prototyping Addons

Social Distancing

To avoid two players being too close, we provide a "Social Distancing" module.

To do so, the network player prefab must contains a ForbiddenArea game object with a collider (capsule collider for example). This represent the forbidden area to all other remote players.

fusion xr-prototyping-modules social distancing forbiddenarea

The SocialDistancing class must been added to the network player prefab.

fusion xr-prototyping-modules social distancing

It implements the ILocomotionValidator interface. So, the CanMoveHeadset method checks if the player's head is above the ForbiddenAreadefined above by performing a raycast towards the ground. To avoid auto collision detection, the ForbiddenArea is deleted during the Spawned() for the local network rig.

When a collision is detected, movement is prohibited and a visual feedback can be displayed to indicate the prohibited area. To add a visual feedback, add the SocialDistancingVisualFeeback class to the network player prefab. Then SocialDistancing can call the DisplayForbiddenArea()` method which displays a sprite for a certain period of time.

fusion xr-prototyping-modules social distancing socialdistancingvisualfeeback

Please note that the mechanism does not prevent two players from getting closer if they move towards each other simultaneously.


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

fusion industries addon social distancing

The player network rig contains a ForbiddenArea : it is a simple capsule. This game object is set to the ForbiddenLocomotion layer. Also, a circle sprite renderer is located on the network rig. Thanks to the SocialDistancingVisualFeeback, the circle is displayed when a distant player attempts to move or teleport to the player so that they can understand why the move is not successful.


This addon latest version is included into the Industries addon project

Supported topologies

  • shared mode


  • Version 2.0.0: Fusion 2.0 support
  • Version 1.0.2: Namespace modification
  • Version 1.0.1: Add demo scene + add namespace
  • Version 1.0.0: First release
Back to top