(Last updated 21/07/2018)

To avoid players hitting other players or walls, here is a boundary system showing visual indications to the players

Package Overview

Boundaries

Materials

Grid pattern 02.mat : material creating the blue grid (check picture below)

GridVRTrackerV2.png : image at the origin of the material above

Prefabs

VRT_RoomBoundary : prefab to drop in the scene to show the walls

VRT_PlayerBoundary : user's circle boundary to drop in the Player prefab

VRT_Wall : represents a wall and is instantiated dynamically

Scripts

VRT_BoundarySystem.cs : Controls the Room Boundaries

VRT_PlayerBoundaryChecker.cs : Check the distance to other players in the room

VRT_PlayerBoundaryRenderer.cs : Creates the line renderer to show the circle around the player

TextureAlpha.cs : Change the alpha of the standard shader of the material

TextureResize.cs : Resize the texture using world space value to avoid stretching textures

Room Boundaries

The Room Boundaries are the blue grids shown below. There goal : show the limits of the real room to your players. The grids fade in when the players gets close to wall and show him all the room.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/bb4b9f41-8b63-4347-8386-dd342b48219a/Capturedecran2018-04-13a18.04.13.png

To use the Room Boundary system, simply drag and drop RoomBoundary prefab in your scene. Then add as many corners as you want, and set there position. Those positions will match real life positions as set during the calibration.

The boundary system works by continuously checking the distance from each wall to the Tags, and fading the wall texture depending on that distance.

Wall textures can be changed by updating the Wall prefab.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/90145dd2-d1a0-49a2-86e5-58b816cce434/Capturedecran2018-04-13a20.24.13.png

Player Boundaries

The Player Boundaries are designed to show other players to you, to avoid collision between players. Here it will draw a circle around the other players when you get close to them.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d7c6e3e7-c562-4a49-ac5f-c0b304c51346/Capturedecran2018-04-13a19.04.40.png

To use the Player Boundary system, simply drag and drop PlayerBoundary prefab in your player prefab. You are not obligated to link the scripts as they can be found on start.

NOTE : Future versions could show boundaries on your player instead of drawing it on each other players. That would help you see risk of collisions even from behind.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1a3bbf31-d125-4c9a-a2f3-a6bc044c1328/Capturedecran2018-04-13a20.34.00.png