private void OnButtonDown(ControllerInputManager.Button button) { // Rotate to normal horizontal with R3: if (button == ControllerInputManager.Button.R3) { StartCoroutine(RotateToHorizon(0.5f)); } // Video Controls: if (button == ControllerInputManager.Button.START) { if (_immersifyPlugin.IsPaused() == true) { // Resume video and audio: _immersifyPlugin.Resume(); } else { // Pause video and audio: _immersifyPlugin.Pause(); } } else if (button == ControllerInputManager.Button.A) { _immersifyPlugin.ToggleFadedPlayPause(false, 2); } else if (button == ControllerInputManager.Button.B) { _immersifyPlugin.ToggleFadedPlayPause(true, 2); } }
private void OnButtonDown(ControllerInputManager.Button button) { if (_mode == ControlMode.WORLD) { // Rotate to normal horizontal with R3: if (button == ControllerInputManager.Button.R3) { StartCoroutine(RotateToHorizon(0.5f)); } // Switch between ViewPoints with the R1 / L1 Buttons // TODO... // TODO: Use a button to switch between day and night... (rotate Directional light). } else if (_mode == ControlMode.UI) { // TODO: Maybe some ui input want to work with buttons (e.g. a bool toggle, press x to enable and disable it). } // Change controller mode: if (button == ControllerInputManager.Button.START) { if (_mode == ControlMode.WORLD) { _mode = ControlMode.UI; _stereoMgr.EnableUi(true); } else if (_mode == ControlMode.UI) { _mode = ControlMode.WORLD; _stereoMgr.EnableUi(false); } } }