Search Issue Tracker


Fixed in 2018.4.X, 2019.4.X



Found in


Issue ID




PhotoCaptureFrame Fails to Provide Camera Matrices on HoloLens 2



1. With the same Unity App built on top of Unity PhotoCapture and PhotoCaptureFrame API, it is able to take photo and retrieve CameraToWorld and CameraProjection matrices on HoloLens 1. The app works fine taking photo data, however, always fails to provide CameraToWorld and CameraProjection matrices on HoloLens 2.

2. How we can reproduce it using the example you attached
1) Have Windows SDK 18362 and VS2019 installed
2) Load UnityPhotoCapture scene into Unity 2019.2.17f1
3) Choose Universal Windows Platform as platform, and ensure capabilities WebCam, Microphone, Location and SpatialPerception are enabled, and Virtual Reality Supprt - Windows Mixed Reality is enabled as well.
4) Build and deploy the app onto Hololens 2
5) Once app gets launched, air-tap to take a photo and watch debug log. It prints out "Failed to get camera to world matrix!" and "Failed to get camera projection matrix!"

  1. Resolution Note (2020.2.X):

    Duplicate of 1297267. The newer bug has a repro project that shows more edge cases of the issue.

Comments (32)

  1. MarionV

    Aug 04, 2020 11:48

    Same as Walkramis. Is it a bug ? If not, how can we use these matrix ?

  2. Walkramis

    Aug 03, 2020 20:49

    It seems to be working for me with 2019.4.6f1 (functions return true) but I am always getting the same matrix from TryGetCameraToWorldMatrix when taking new photos. Is it not completely fixed or am I missing something obvious?

  3. MarionV

    Jul 31, 2020 07:37

    I tried it with the Hololens 2 on the Unity 2019.4.6 and it's now working :D !!

  4. pocce90

    Jul 30, 2020 15:21

    EDIT: The same project builded for Hololens 1 works perfectly.

  5. pocce90

    Jul 30, 2020 14:15

    Ah, of course TryGetCameraToWorldMatrix and TryGetProjectionMatrix returns false.

  6. pocce90

    Jul 30, 2020 13:58

    I tried in unity 2020.2.0a19 and unity 2019.4.5f1 with my Hololens 2, and the output of
    photoCaptureFrame.TryGetCameraToWorldMatrix(out c2wMatrix);
    photoCaptureFrame.TryGetProjectionMatrix(out projMatrix);
    1.00000 0.00000 0.00000 0.00000
    0.00000 1.00000 0.00000 0.00000
    0.00000 0.00000 1.00000 0.00000
    0.00000 0.00000 0.00000 1.00000

    1.00000 0.00000 0.00000 0.00000
    0.00000 1.00000 0.00000 0.00000
    0.00000 0.00000 1.00000 0.00000
    0.00000 0.00000 0.00000 1.00000

  7. vfatuanpv

    Jul 28, 2020 03:19

    Is there any updates on this fix?, I checked all but It still nothing happened

  8. unity_mXfJcqtHzREOAQ

    Jul 21, 2020 07:02

    Hi, I tried on Unity 2020.2.0a18, Unity 2020.2.0a16 , Unity 2019.4.2f1 with XR plugin it still not work on Hololens1 and Hololens2. Still waiting

  9. MarionV

    Jul 20, 2020 14:18


    I need the camera matrices, so I tried it in the 2020.2.0.a16 and I still obtain the identity matrix. Is it normal ?

    Do you know when it will be fixed for the 2019.4 ? Or if there are any alternatives ?

  10. csrussell

    Jun 08, 2020 15:54

    Hey, so this:

    was marked as a "duplicate" of this issue.

    What does that mean for that other bug? That the webcamtexture is not going to be fixed?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.