microsoft / MixedReality-WorldLockingTools-Unity

Unity tools to provide a stable coordinate system anchored to the physical world.
https://microsoft.github.io/MixedReality-WorldLockingTools-Unity/README.html
MIT License
188 stars 45 forks source link

Setting world origin to Pin #283

Closed genereddick closed 2 years ago

genereddick commented 2 years ago

If I want multiple devices to have the same origin pose -- so that every device will both see an asset in the same location but the actual asset transform pose values will be identical on each device -- does this require anything more than setting a pin with a global pose of Pose.identity and whatever virtual pose each device detects?

fast-slow-still commented 2 years ago

Yes, you could do that with a single pin (per device). There would be limits on the quality of alignment, as discussed here and here.

To be clear, if I understand what you are suggesting, you would have a SpacePin component on an object in your scene at the global origin (position=(0,0,0), rotation=(0,0,0,1)). You would somehow establish what pose (frozenPose) the device currently has at the physical location where you want the shared global origin to be.

Then, with your SpacePin's global pose at identity, you would spacePin.SetFrozenPose(frozenPose), where frozenPose is the pose determined per device above.

That might be all the alignment accuracy your application needs. As discussed in the above links, you can improve accuracy from there with additional pins.