MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Camera some time get wrong position

Open warzoku opened this issue 8 years ago • 18 comments

In Mixed reality portal camera always get right rotation and distance from floor but in app when scene is begining Camera don't get right distance from floor. (Microsoft Mixed Reality Headset)

warzoku avatar Jan 18 '18 09:01 warzoku

The same here, also recently faced this issue. As I notice it take 5-20 seconds to fix vertical offset, sometime app start with camera on the floor, then I move head side-to-side it get my normal elevation. Seems Headset lost tracking, not sure. Also in seating/standing experience the position in somewhere in 1 meter above the floor but at the same time Cliff House track elevation well.

oden3d avatar Jan 26 '18 08:01 oden3d

My comment above is about Microsoft Mixed Reality Headset.

oden3d avatar Jan 26 '18 08:01 oden3d

Same here. It's not due to tracking loss, because in Cliffhouse, floor is in the right position. This is the most frustrating problem. When this occurs, I close and reopen Unity, or exit the app and launch it again, but success is so random.

designnomad avatar Jan 31 '18 23:01 designnomad

I note it recently happen when I see that headset lost tracking (not bounds displayed). And @designnomad right, switching back to Cliffhouse works well. To fix this issue do one of the point below:

  1. Move head side-to-side, sometime in 10-15 seconds problem disappear.
  2. Restart Mixed Reality Portal.

oden3d avatar Feb 01 '18 08:02 oden3d

Thanks for answers. Maybe anyone know is It

  1. hardware problem?
  2. SDK problem
  3. My wrong code

warzoku avatar Feb 02 '18 12:02 warzoku

This definitely happen when Headset lost (safety) boundary. Could you please point me on where MixedRealityCamera.Transform.position changes, I will have a close look on this while working on current project.

oden3d avatar Feb 04 '18 00:02 oden3d

Think the problem somewhere in the MRTK. The best solution in case there is no boundary or elevation data to get some default average value of 1.6-1.8 meters.

oden3d avatar Feb 04 '18 00:02 oden3d

I don't know where in code camera is getting its position. But as far i know it is impossible to set position to camera.transform it can be possible only for camera parent. Most offten this problem appear if headset place on table(for example) in begining of scene. But sometimes problem can be too even if headset on head.

warzoku avatar Feb 04 '18 11:02 warzoku

Which version of Unity are you using? This sounds like a Unity issue, since the camera's position (other than moving the camera parent for teleporting) and the alignment of the coordinate space are both handled by the platform/Unity, not by the Toolkit.

keveleigh avatar Feb 04 '18 18:02 keveleigh

Unity 2017.3.0f3

Also have some issue with the camera height. Image you have a floor and a 1m height box, your camera at 1.8m. You teleport from the floor to the box (camera height 2.8) then back to the floor and sometime camera height stay at 2m or 2.5m. I.e. after teleport on some different height the camera elevation does not return at origin value.

oden3d avatar Feb 04 '18 20:02 oden3d

keveleigh, Unity 2017.3.0f3 and in Unity 2017.2.0p1-MRTP4 this problem was. I mean if I set camera position in LateUpdate camera position doesn't change. But problem in another. Camera sometimes after scene starts still placing on floor and doesn't jump to right position from floor. And sometimes together with this problem also controllers not spawned

warzoku avatar Feb 05 '18 07:02 warzoku

Unity 2017.3.1 released today but I did not found any information about this issue https://unity3d.com/unity/whats-new/unity-2017.3.1

oden3d avatar Feb 05 '18 23:02 oden3d

Just tested and camera positioning issue exists on Unity 2017.3.1

oden3d avatar Feb 07 '18 00:02 oden3d

@warzoku

I mean if I set camera position in LateUpdate camera position doesn't change.

That's right. Unity overrides any change to the camera based on the user's head movement. That's why we use the camera parent object to move the camera around.

All of the camera issues sound like Unity bugs, where they aren't properly moving the coordinate space.

keveleigh avatar Feb 07 '18 00:02 keveleigh

Sent bug report to Unity Case 1001658

oden3d avatar Feb 13 '18 09:02 oden3d

Got response from Unity team. They have been able to reproduce this issue and have sent it to developers for resolution.

oden3d avatar Mar 01 '18 18:03 oden3d

I'm still experiencing this issue on Unity 2018.2.4f1. Usually have to restart Unity to get the camera to show in the correct height from the floor. But even when it does, then minutes later it shows again on the floor.

The camera in the Cliff House is fine.

Not sure if it's related but I'm using VRTK which comes with a Win MR camera prefab.

fariazz avatar Aug 21 '18 08:08 fariazz

This issue is still reproducible with Unity 2019.2.6f1.

Le0nLyn avatar Oct 24 '19 20:10 Le0nLyn