cancel
Showing results for 
Search instead for 
Did you mean: 

Keeping a Guardian Room Scale Playspace Centered at 0,0,0

sourcenity
Level 4

Hi.


The Oculus Quest/Rift software allows the setting of a Guardian space, which has a defined width, length, and center in any given room. The Guardian does not change when resetting the view or taking off the glasses, waiting for them to go to standby, and turning it on again.

 

However, when resetting ("centering") the view or taking off/putting on the glasses, the center point and orientation of the user changes. In particular, the current center of the user changes to 0,0,0 in Unity, but this is no longer the center of the Guardian.

 

My question: Is there any way to keep the Guardian center at 0,0,0 in all cases, even if the user resets their view?

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

sourcenity
Level 4

@DarkTable Unfortunately, the Oculus integration is only informed that a change took place, but the recentering of Unity's world center (0,0,0) takes place outside of the integration (I believe within the package DLLs, but definitely not as part of the asset). So, we can't just ignore the call.

 

It is possible to use the OVRBoundary* methods to grab the actual center of the guardian and then move the rig in the opposite direction and rotation, but this is more of a hack than a solution.

 

However, I did find a solution: On Quest, you can switch the TrackingOrigin from Eye or Floor to Stage, which will keep Unity's world center and orientation in the center of the guardian. This is what I want, so it's fine. It doesn't work on Quest-via-Rift, though, and I haven't tested it on the purely PC hardware (Rift).

 

Thanks.

 

 

View solution in original post

2 REPLIES 2

DarkTable
Level 5

If you're using the Oculus Integration, I believe these situations will call OVRDisplay.RecenterPose(). You could modify this method in the Oculus Integration so it doesn't do anything in these situations?

 

Alternatively you could have a calibration step in your application where you make the user stand on a specific spot and call OVRBoundary.TestNode(Node.Head, BoundaryTyle.PlayArea) to make sure they're in the right spot within the guardian. If they're not you could call OVRDisplay.RecenterPose() to reset calibration? (You'd probably also need to make sure they're facing towards a specific direction too.)

sourcenity
Level 4

@DarkTable Unfortunately, the Oculus integration is only informed that a change took place, but the recentering of Unity's world center (0,0,0) takes place outside of the integration (I believe within the package DLLs, but definitely not as part of the asset). So, we can't just ignore the call.

 

It is possible to use the OVRBoundary* methods to grab the actual center of the guardian and then move the rig in the opposite direction and rotation, but this is more of a hack than a solution.

 

However, I did find a solution: On Quest, you can switch the TrackingOrigin from Eye or Floor to Stage, which will keep Unity's world center and orientation in the center of the guardian. This is what I want, so it's fine. It doesn't work on Quest-via-Rift, though, and I haven't tested it on the purely PC hardware (Rift).

 

Thanks.

 

 

View solution in original post