Mixed Reality Portal API -- Programmatically center Windows Mixed Reality VR headset

293 views Asked by At

Is there a Windows Mixed Reality API that exposes the functionality in the Mixed Reality Portal? Specifically, how can one set the room boundary and center the headset without the GUI app (images below)?

Room Boundary Selection

Headset Centering

One can automatically configure Mixed Reality to use the seated mode by adding a JSON configuration file: https://learn.microsoft.com/en-us/windows/mixed-reality/discover/location-based-experiences#how-to-configure

Unfortunately, the JSON configuration does not include a way to "center" the headset.

1

There are 1 answers

0
Hernando - MSFT On

In Unity, you need first to set Unity to the RoomScale tracking space type with this code: XRDevice.SetTrackingSpaceType(TrackingSpaceType.RoomScale). And once your app successfully sets, The origin at 0, 0, 0 will be the specific place on the floor where the user stood during room setup. More information please see:Building a standing-scale or room-scale experience

In DirectX, it is similar to that in Unity: create the stationary reference frame once when the app is launched with the origin placed at the device's position when the app is launched. You can follow this documentation to set up the holographic space: Getting a HolographicSpace