Correct way to pause game when headset removed / Dash up?
Hi! I am working on a VR application and I need to meet VR.PC.Functional.3. I am testing this in a simple Menu Scene I designed, and it only works partially. When I hit the Oculus button to return to the Dash, the app pauses. Hitting that button again returns the game correctly. However, upon removal of the headset and putting it back on, the OVRCameraRig never begins rendering again. I looked at the component in the inspector while this problem is occurring, and it appears the the OVRCameraRig never was SetActive(true) again. Can anyone help or give me their code that works? Thanks in advance, PicoPlanet Developing Below is my pause script, attached to a separate gameobject: using System.Collections; using System.Collections.Generic; using UnityEngine; public class MenuPauseControl : MonoBehaviour { public GameObject OVRCameraRig; public GameObject Canvas; public GameObject EventSystem; void Start() { } void Update() { if (OVRManager.hasInputFocus && OVRManager.hasVrFocus) { ContinueGame(); } else { PauseGame(); } } private void PauseGame() { Time.timeScale = 0; //Disable stuff that still work while timescale is set to 0 OVRCameraRig.SetActive(false); Canvas.SetActive(false); EventSystem.SetActive(false); } private void ContinueGame() { Time.timeScale = 1; //enable the stuff again OVRCameraRig.SetActive(true); Canvas.SetActive(true); EventSystem.SetActive(true); } } and here's my hierarchy: Any help / code would be greatly appreciated!6.3KViews0likes6CommentsDetect Hand Tracking System gesture with OVRInput
Hi there, I'm making an app that uses Hand Tracking and I want the pause menu to appear when the user does a System Gesture with their no0n-dominant hand. In the docs it says that I should "poll Button.Start" which I have tried. This works with the touch controller but not hand tracking. Anyone have luck getting this system gesture to register? I'm posting some of my code below public UnityEvent onUse; void Update() { if (OVRInput.Get(Button.Start)) { Debug.Log("System Gesture"); onUse.Invoke(); } } Also here is the part of the documentation that talks about the system gestures Check System Gestures The system gesture is a reserved gesture that allows users to transition to the Oculus universal menu. This behavior occurs when users place their dominant hand up with an open palm towards the headset and then pinch with their index finger. When the users uses the non-dominant hand to perform the gesture, it triggers the Button.Start event. You can poll Button.Start to integrate any action for the button press event in your app logic. To detect the dominant hand, call the IsDominantHand property from OVRHand.cs and to check whether the user is performing a system gesture, call the IsSystemGestureInProgress property from OVRHand.cs. We recommend that if the IsSystemGestureInProgress property returns true , the app should provide visual feedback to the user, such as rendering the hand material with a different color or a highlight to indicate to the user that a system gesture is in progress. The app should also suspend any custom gesture processing when the user is in the process of performing a system gesture. This allows apps to avoid triggering a gesture-based event when the user is intending to transition to the Oculus universal menu.3.1KViews0likes2CommentsFailed to pause when remove HMD.
Hi, maybe someone can help me, my app was rejected because it fails to pause when the user remove the headset. I already uncheck "Run in Background". I need to add code to OVR Manager? Using Unity 2018.3 with native Oculus Sdk and the lastest Oculus Integration Pack for Unity. Thanks.488Views0likes0Comments