Skip to content

How to get origin SpatialCoordinateSystem using MRTK + OpenXR #10266

Answered by keveleigh
cgsaxner asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, I have a better update for you! I recently found out that you can access the root SpatialCoordinateSystem via a helper function in the Mixed Reality OpenXR Plugin package:

using Microsoft.MixedReality.OpenXR;
using Windows.Perception.Spatial;
SpatialCoordinateSystem origin = PerceptionInterop.GetSceneCoordinateSystem(UnityEngine.Pose.identity) as SpatialCoordinateSystem;

The resulting Windows.Perception.Spatial.SpatialCoordinateSystem object is located at the given pose in the current Unity scene.

Replies: 7 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by keveleigh
Comment options

You must be logged in to vote
1 reply
@NikolayMXR
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #10082 on October 18, 2021 18:36.