I am trying to understand the matrices of the locatable camera to world compared with the Hololens unity camera.
I place the Unity Hololens camera object at the origin of the scene. Then I deploy and put on the Hololens. I walk to the location of a marker and take a photo using PhotoCapture. Then I print the TryGetCameraToWorldMatrix and the transform from the Hololens Unity camera. I expect the location of the locatable camera to be in front of and a little higher than the Unity camera. Instead I get matrices that are in different frames. They are close enough that I think they are related but I cannot figure out how.
Hololens Unity Camera
[0.8860495, -0.02733571, -0.462784, 2.97907],
[0.1067593, 0.983461, 0.146311, -0.4349374],
[0.4511305, -0.1790453, 0.8743135, 0.5294006],
[0, 0, 0, 1]
Locatable Camera returned from TryGetCameraToWorldMatrix
[0.8868181, 0.0991262, 0.4513606, -2.802217],
[-0.0168249, 0.9830014, -0.1828253, 0.6130467],
[-0.4618111, 0.1545389, 0.8734108, 1.034189],
[0, 0, 0, 1]
Shouldn’t this be trivial?
LocatableCameraToHololensUnityCamera = locatableCameraToWorld * HololensUnityCamera.localToWorldMatrix.inverse
But that doesn’t work. The result shows them way too far apart.
Can someone tell me what I’m missing?
Scott