After obtaining the subsystem, call TrySetTrackingOriginMode: xrInputSubsystem.TrySetTrackingOriginMode(TrackingOriginModeFlags.Floor) Set your tracking origin mode on the XRInputSubsystem. In the Inspector panel, find the Transform component and change the Position to (X: 0, Y: 0, Z: 0).From the Hierarchy panel, expand the MixedRealityPlayspace GameObject and find the Main Camera child object.MRTK should handle the position of the playspace and camera automatically, but it's good to double check: Use the MixedRealityPlayspace class from MRTK for Unity and set the Target Scale to either Room or Standing: We recommend using unbounded space to maximize stability and create anchors in multiple rooms. HoloLens camera setupįor HoloLens apps, you need to use anchors for any objects you want to lock to the scene environment. Once you've got that, skip to whichever setup section applies. The central choice you need to make is whether you're developing for HoloLens or VR immersive headsets. Since the Main Camera is tracking movement of the user's head, the starting position of the user can be set by setting the starting position of the Main Camera. It'll be easier to lay out your app if you imagine the starting position of the user as (X: 0, Y: 0, Z: 0). Whatever kind of experience you're developing, the Main Camera is always the primary stereo rendering component attached to your device's head-mounted display. You can use script code to determine at runtime whether the headset is immersive or holographic by checking HolographicSettings.IsDisplayOpaque. You can use script code to determine at runtime whether the headset is immersive or holographic by checking displayOpaque on the actively running XRDisplaySubsystem. To check the camera's opaqueness, the MixedRealit圜amera system has an IsOpaque property. MRTK will handle specific camera settings automatically, based on the configuration in the camera system profile. If setting this from code, you can use Unity's Color.clear.Select the Background color picker and change the RGBA values to (0, 0, 0, 0).In the Inspector panel, find the Camera component and change the Clear Flags dropdown from Skybox to Solid Color.Select the Main Camera in the Hierarchy panel.Set the camera background to be transparent (in HoloLens, black renders as transparent) instead of a Skybox texture: However, when running on a holographic headset like HoloLens, the real world should appear behind everything the camera renders.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |