(Last updated 21/07/2018)
To avoid players hitting other players or walls, here is a boundary system showing visual indications to the players
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
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.
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.
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.
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.