public void VRModeCameraSetUp() { this.gameObject.GetComponent <VRCam>().enabled = true; this.gameObject.GetComponent <ChaseCam>().enabled = false; blackScreen.gameObject.SetActive(false); vRCamera = this.gameObject.GetComponent <VRCam>(); mainCamera.GetComponent <Camera>().stereoTargetEye = StereoTargetEyeMask.Both; // FadeOut(); if (CalibrationManager.Instance != null) { SetOffset(CalibrationManager.Instance.GetSeatCalibrationOffsetPosition()); } else { SetOffset(Vector3.zero); Debug.Log("<color=red>Error: </color>No Calibration Manager found, please add to the scene."); } if (_objectToFollow != null) { vRCamera.SetSeatPosition(_seatPosition); vRCamera.Seat(); } }
void Start() { _distanceVector = new Vector3(); vRCam = CameraManager.Instance.GetVRCamera(); _vrCameraObject = CameraManager.Instance.GetMainCamera().gameObject; _cameraOffsetObject = CameraManager.Instance.GetCalibrationOffset(); if (vRCam == null) { Debug.LogError("Please add the VRCam Prefab in the Inspector"); } }
public void OnSceneLoaded(bool autoFadeIn) { _objectToFollow = SceneLoadingHandler.Instance.GetParticipantsCar(); _seatPosition = SceneLoadingHandler.Instance.GetSeatPosition(); vRCamera = this.gameObject.GetComponent <VRCam>(); if (CalibrationManager.Instance.GetVRActivationState()) { vRCamera.SetSeatPosition(_seatPosition); vRCamera.Seat(); } else { SetSeatPosition(_objectToFollow); } if (autoFadeIn) { StartCoroutine(FadeIntoTheScene()); } }
private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { vRCam = CameraManager.Instance.GetVRCamera(); }