This document is about: FUSION 1
SWITCH TO

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

Locomotion validation


Available in the Industries Circle
Circle
Fusion Industries prototyping Addons

This module extends the locomotion system available in VRShared, to validate some locomotion attempts before applying them (locked places, places with limited capacities, restricted area, personal safe zone, ...).

Locomotion validation system

To determine if the user is not trying to go to a forbidden zone, every locomotion system first asks the HardwareLocomotionValidation component, placed on the HardwareRig, if they can move to this position, with the CanMoveHeadset() method. To answer, the HardwareLocomotionValidation first checks if the move is valid with all its ILocomotionValidator childs, and all the ILocomotionValidator childs of the NetworkLocomotionValidation component, placed next on the NetworkedRig instance representing the local user on the network.

Locomotion validation system

This allows to have 2 kind of restrictions:

  • restrictions to offline data (hardware info, static scene, ...)
  • restrictions associated to the networked state of the user

Other restrictions

Additionally, the locomotion is limited by other factor, depending on the locomotion system used:

  • RigLocomotion: an user can only teleport on an collider with a layer in the RigLocomotion's locomotion layer mask (like the TeleportTarget layer)
  • LocomotionValidatedDesktopController desktop locomotion : for desktop builds, as moves initiated by the keyboard would allow to ignore the RigLocomotion teleport restrictions, this controller checks that the head position after a move would be correct, by checking:
    • if it would not be inside a collider after the move
    • if a correct walkable navigation mesh point will be under it after moving

Demo

A demo scene can be found in Assets\Photon\FusionAddons\LocomotionValidation\Demo\Scenes\LocomotionValidation.unity.

Fusion Industries Addon Locomotion Validation

The scene contains several areas connected by bridges.
These objects have a different configuration regarding the layer and the navmesh parameters :

  • Green objects : set to Walkable in Navigation & layer is set to Locomotion (same as the rig RigLocomotion LocomotionLayerMask parameter), so players can move & teleport on them,
  • Red objects : set to Not Walkable in Navigation & layer is set to ForbiddenLocomotion, so players can NOT move or teleport on them,
  • Orange objects : set to Not Walkable in Navigation & layer is set toLocomotion (same as the rig RigLocomotion LocomotionLayerMask parameter), so players cannot walk up to them but they can teleport on it.
  • Grey cylinders : they are referenced in the ForbiddenZones components (HardwareRig & DesktopRig). The ForbiddenZone script demonstrates how to implement the ILocomotionValidator interface. In this example, the CanMoveHeadset() function of ForbiddenZone return false when the player head is in the zone area in order to trigger the fader (thanks to the InvalidMoveCameraFader & HardwareLocomotionValidation scripts).
    Please note that if a player teleports to on orange object, he can then walk on it to avoid being blocked in this area. Then, the locomotion validation will be activated again when the user returns to a green object. If you want to avoid this behavior, make sure that Not Walkable objects are in the ForbiddenLocomotion layer.

Download

This addon latest version is included into the addon project

Supported topologies

  • shared mode

Changelog

  • Version 1.0.2: Improve demo scene with ForbiddenZones
  • Version 1.0.1: Add demo scene + add namespace
  • Version 1.0.0: First release
Back to top