I’m trying to create something simular to "Everest VR"’s "Stand on the footprint" system.
The way it works is the game get’s the XR boundary, places a footprints texture in the corner of the play area and rotates the footprints towards the center of the playarea.
Now this isn’t too hard, I’m currently developing on Oculus Quest and I’m using:
using Unity.XR.Oculus; public GameObject PlayAreaVisual; // A visual reference of what should be the playarea bool oculusPlayAreaSet = Boundary.GetBoundaryDimensions(Boundary.BoundaryType.PlayArea, out Vector3 dim); PlayAreaVisual.transform.localScale = new Vector3(dim.x, 0.1f, dim.z);
to get the size of the playarea. The issue is that if the user resets the camera / "Reset view" by holding the Oculus button, it’s as if the XR system doesn’t understand that the camera has been reset, and uses the camera reset as an offset and doesn’t show the "real world boundaries".
In the screenshot you can see the
Vector3 which is
Boundary.GetBoundaryDimensions(Boundary.BoundaryType.PlayArea, out Vector3 dim); This gives the size of the boundary but I still don’t know the correct position
I even tried having two custom play area objects, one on the camera offset, and one on the XR Rig root, but they end up overlapping
TLDR; Using the Oculus Quest "Reset View" makes Unity "forgot" where the boundry is supposed to be
Question: How do you get the boundary world position / XR rig offset?