VRController

VRController
MonoBehaviour, ITeamBelong

The VRController is the main controller for the Player

It contains a static list of all players and a reference to the local player.

The VRController sets which HMD is currently loaded, and all scripts that need this use this value except for VRInput that use it's own value for loaded HMD.

The VRController also contains the Player's Team that is used for testing hits, and is responsible for syncing Teams between clients. This Team is used to set in weapons and projectiles that the player interacts with.

The VRController has a reference to all Colliders on the player as well as all Renderers

The Colliders are used to enable or disable collision on death.

The Renderers are used to set Team visuals

The VRController contains a dictinonary reference to Hands by VRNode

The List of players is set up is Start meaning that it is not accessible immediately after spawning.

This is due to the ViewIDs (and thus the owner) being sent and assigned after the player is spawned in the Lobby.

The VRController assigns hands and initializes the ControllerInputModule used for VR UI input in start. Meaning that UI input is not possible before player spawns.

The VRController is responsible for disabling player components that are not used by external clients

These include
 * Camera
 * AudioListeners
 * Vive Controller Manager
 * Vive Play Area

It also assigns the hands on VRInput for Vive.