carmines / UnityPluginCollection

source code for Unity plugins for Desktop and UWP
MIT License
30 stars 7 forks source link

Hololens 2 Projection Matrix after firmware update #12

Closed astaikos316 closed 3 years ago

astaikos316 commented 3 years ago

I used this plugin last March when I first received my HoloLens 2 to pull the camera projection matrix and it worked perfectly. Now, however, when trying to get the camera projection matrix now after the latest HoloLens 2 January firmware update (20H2), the matrix shows as all 0's when looking at the output of Debug.Log(state.cameraProjection) in the CamerCapture script in the TakePhotoAsync function. Has anyone else seen this issue? Is there a fix that can be made?

carmines commented 3 years ago

have a look at the PhotoTransform branch, updated it to ensure the transform is grabbed immediately after capture. If you wait too long to execute that code, it will not be available to query.

astaikos316 commented 3 years ago

@carmines I just tried running the new branch and still getting teh same results. I simply added Debug.Log(state.cameraProjection) line in the CameraCapture.cs script in the TakePhotoAsync() function and still shows all zeros.

astaikos316 commented 3 years ago

@carmines I also noticed that when I put a Debug in the OnPreviewFrameChanged functionI do not see the updated matrices anymore when running video preview. The debug statement is actually not run as in the previous build I had.