This document is about: FUSION 1
SWITCH TO

このページは編集中です。更新が保留になっている可能性があります。

Social Distancing


Available in the Industries Circle
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.

Demo

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.

Download

This addon latest version is included into the addon project

Supported topologies

  • shared mode

Changelog

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