# TryGetCameraToWorldMatrix(out Matrix4x4)

> This method will return the camera to world matrix at the time the photo was captured if location data if available.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Windows.WebCam](/engine/6000.5/script-reference/unityengine/windows/webcam.md)
* **Assembly:** UnityEngine.CoreModule

## TryGetCameraToWorldMatrix(Matrix4x4)

```csharp
public bool TryGetCameraToWorldMatrix(out Matrix4x4 cameraToWorldMatrix)
```

### Parameters

**** (\[Matrix4x4]\(/engine/6000.5/script-reference/unityengine/matrix4x4)): A matrix to be populated by the Camera to world Matrix.

### Returns

| Type                                                          | Description                                                                                                  |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if a valid matrix is returned or false otherwise. This will be false if the frame has no location data. |

### Remarks

If location data is unavailable then the camera to world matrix will be set to the identity matrix.
