We’re trying to force the user to recenter before starting up our app (because often they start way outside of the intended position.) Looking for a way to detect when the user has recentered in Unity app.
Give this a try:
using UnityEngine;
using System;
public class RecenterDetector : MonoBehaviour
{
private void OnEnable()
{
OVRManager.display.RecenteredPose += HandleRecenteredPose;
}
private void HandleRecenteredPose()
{
Debug.Log("Recenter Detected");
}
private void OnDisable()
{
OVRManager.display.RecenteredPose -= HandleRecenteredPose;
}
}
2 Likes