Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the problem with accumulating teleportation heights #1400

Closed
wants to merge 1 commit into from
Closed

Conversation

Alexees
Copy link
Contributor

@Alexees Alexees commented Nov 20, 2017

Overview

The MixedRealityCameraParent changed heights based on a raycast from the head to the floor. Depending on where the camera is in relation to the parent, the parent's base height shrank or grew. The head raycast howere is not needed and removed since the relative distance to the cameraParent is always controlled via IHDM and the target teleport position for the parent is always known.

Changes

#1181 The MixedRealityCameraParent changed heights based on a raycast from the head to the floor. Depending on where the camera is in relation to the parent, the parent's base height shrank or grew. The head raycast howere is not needed and removed since the relative distance to the cameraParent is always controlled via HDM and the target teleport position for the parent is always known.
Copy link
Contributor

@keveleigh keveleigh left a comment

Choose a reason for hiding this comment

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

This change seems to assume a couple things:

  1. The app will have a RoomScale tracking space type.
  2. The initial floor will be placed at Y = 0.

Apps setting their tracking space type to Stationary won't have the camera height offset from the parent like you're expecting, so you'll teleport the camera into the teleport spot.

Although a floor at Y = 0 in RoomScale should be the desired state most of the time, there may be scenarios where that isn't the case.

The second assumption is probably less important to handle, but this should take the different tracking space types into account at least.

Copy link
Contributor

@StephenHodgson StephenHodgson left a comment

Choose a reason for hiding this comment

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

I agree with Kev here.

@Alexees
Copy link
Contributor Author

Alexees commented Nov 21, 2017

I have a question about the stationary space type then. Why is the camera not getting the same height data like it gets when in Room Scale mode? The MR Portal seems to keep the head above the floor just fine, no matter the type, why is the camera tracking data passed to Unity differing?
About the y position. As far is I understand, any floor at a height lower than 5 below the head and higher than the head won't be captured by the raycast anyways.
If the head was just always the same height relative to the parent, as it is in the Portal, the teleport would work because it would always just be the feet that moved..

@keveleigh
Copy link
Contributor

@Alexees That's by definition of Stationary vs RoomScale.

https://developer.microsoft.com/en-us/windows/mixed-reality/Coordinate_systems_in_Unity.html#building_an_orientation-only_or_seated-scale_experience
A Stationary space type matches the existing functionality on HoloLens, where (0, 0, 0) is wherever the device was on app launch, and there's no information about a floor. For an immersive headset, it's intended for seated experiences, where the user doesn't need to see/know about the floor or boundary.

@StephenHodgson StephenHodgson changed the base branch from master to Dev_Working_Branch November 22, 2017 19:02
@hridpath
Copy link

I am experiencing the Teleport Marker comming off the floor at times. Is this issue the same? Theoretically the position of the marker should be based on a trajectory calculation where the end point (target) would be on a mostly flat surface that would allow for "targeting" and the beginning of the trajectory is the pointer or the camera. Based on the angle of elevation the target position can be calculated using velocity, gravity and time.
This would produce a close reporduction of what is happening in the Cliff house. Adding a line with the trajectories points would give us the ray.

@NeerajW
Copy link

NeerajW commented Dec 4, 2017

We need fixes here so removing pending for release tag. Not blocking for this release.

Copy link
Contributor

@SimonDarksideJ SimonDarksideJ left a comment

Choose a reason for hiding this comment

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

Note, this PR is now stale due to the Namespace updates in the Dev_Working branch. Please refresh or create a new PR against Dev_Working with these changes please.

@StephenHodgson
Copy link
Contributor

Teleport system has been rewritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants