An abstract class in Root.Township, the global namespace.
Base player controller for VR. When linked to the local player it adds vision comfort and HMD tracking.
Constructors
| Member | What it is |
|---|
protected VRPlayerController() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private IPlatformDevice platformDevice | Injected platform device, passed to vision comfort. |
private PlayerVisionComfort visionComfort | Vision comfort handler for the local player, or null. |
private VRTrackedDevice vrTrackedDevice | HMD tracking on the camera for the local player, or null. |
Methods
| Member | What it is |
|---|
void InjectPlatformDevice(IPlatformDevice platformDevice) | VContainer injection point for the platform device. |
protected override void Awake() | Hooks the linked-to-local-player event. |
protected override void OnDestroy() | Disposes the HMD tracking and vision comfort. |
1 private and internal method
| Member | What it is |
|---|
private void Linked() | For the local player, creates the vision comfort handler and starts HMD tracking on the camera. |