Search Issue Tracker

Fixed in 2020.2

Fixed in 2018.4, 2019.4



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. Response avatar

    Resolution Note (fix version 2020.2):

    Legacy WMR is not available in 2020.2, but we will be adding this feature for XR WMR plugin within the next month.

Comments (21)

  1. F84bbc4ab81706e9c06ad6865d555480?d=mm


    Jul 31, 2020 07:37

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

  2. D5bdec18ac0eb1cc08516c14aade53e8?d=mm


    Jul 31, 2020 03:25

    POCCE90: I also use Unity 2019.4.2f1
    Take the photo by using UnityEngine.Windows.WebCam; PhotoCapture and the result of TryGetCameraToWorldMatrix is false on Hololens 1

    Can you help me send your example to my email:

  3. 63f9f16383643c39d8564370b6cb4873?d=mm


    Jul 30, 2020 15:21

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

  4. 63f9f16383643c39d8564370b6cb4873?d=mm


    Jul 30, 2020 14:15

    Ah, of course TryGetCameraToWorldMatrix and TryGetProjectionMatrix returns false.

  5. 63f9f16383643c39d8564370b6cb4873?d=mm


    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

  6. D5bdec18ac0eb1cc08516c14aade53e8?d=mm


    Jul 28, 2020 03:19

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

  7. Ced2ee287ee71e9c2b2ea07ae9b6419f?d=mm


    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

  8. F84bbc4ab81706e9c06ad6865d555480?d=mm


    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 ?

  9. 4b2536c390882ce0941c2aebf5993b55?d=mm


    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?

  10. 6822b05f57656148ccc1fc1ae69143f0?d=mm


    Jun 03, 2020 18:25

    Hi there,

    People have been reporting issues with PhotoCapture in Unity @HoloLens2 for several months now:


    In my case I am not getting the CameraToWorldMatrix or ProjectionMatrix when I run my app on the HoloLens 2 while the app works just fine on the HoloLens 1.

    Is there any walk around for this or is there a fix comming soon?

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.