Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Enable resetting spatial alignment. #234

Merged
merged 6 commits into from
Oct 4, 2019

Conversation

chrisfromwork
Copy link
Contributor

@chrisfromwork chrisfromwork commented Oct 2, 2019

This pull request addresses the following issue: #78 This change allows users to reset their localization coordinate at runtime. It helps in scenarios where marker detection localization does not work well as well as when multiple devices try and localize at the same time.

This review contains the following:

  1. ISpatialLocalizationSession is updated to expose its associated IPeerConnection. This logic to assess whether incoming localization requests are associated with peers partaking in existing localization sessions.
  2. A new property, AllCoordinatesLocated is exposed on SpatialCoordinateSystemManager. This enables showing UI that tells the end user whether they have completed spatial alignment in the shared experience.
  3. SpatialLocalizationInitializer has been redefined to have methods for both running and resetting localization sessions. These functions also now return success/failure values.
  4. Transforms in the MarkerVisualCoordinateService are updated to use local positions/local rotations to avoid using camera parent transforms when assessing camera position in the local application space.
  5. A new button has been placed on the Default Mobile UI prefab that allows users to reset their spatial alignment
  6. Additional UI has been added to the Default Mobile UI prefab to allow users to see the state of spatial alignment for their shared experience.

Breaking Change Details:

Notes:

This review introduces breaking changes into ISpatialLocalizationSession and SpatialLocalizationInitializer. It also changes some public facing functions on SpectatorView for starting and resetting localization sessions.

Migration Instructions:

  1. Update any custom implementations of ISpatialLocalizationSessions to expose their associated SpatialCoordinateSystemParticipants as IPeerConnetions.
  2. Update any custom child classes for SpatialLocalizationInitializer to implement updated functions. This will require returning success/failure values when running localization sessions.

@chrisfromwork chrisfromwork added the breaking change Pull request contains a breaking change and requires additional information. label Oct 2, 2019
@chrisfromwork chrisfromwork changed the title Enable resetting localization. Enable resetting spatial alignment. Oct 2, 2019
Copy link
Contributor

@andreiborodin andreiborodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@chrisfromwork chrisfromwork merged commit 46a7b36 into microsoft:master Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change Pull request contains a breaking change and requires additional information.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants