---
title: "viewMatrix(viewRotationAngle:)"
framework: arkit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+]
path: "arkit/arcamera/viewmatrix(viewrotationangle:)"
---

# viewMatrix(viewRotationAngle:)

Returns the view matrix for the camera with a given view angle.

## Declaration

```swift
func viewMatrix(viewRotationAngle: CGFloat) -> simd_float4x4
```

## Parameters

- `viewRotationAngle`: The view rotation angle, in degrees, that will be used to render the camera’s view.

## Return Value

Return Value The view matrix for the given view angle.

## Discussion

Discussion The view matrix can be used to transform geometry from world space into camera space for a given view angle. The view angle, in degrees, is the clockwise rotation needed to keep the camera image level with the horizon (0 LandscapeRight, 90 Portrait, 180 LandscapeLeft, 270 PortraitUpsideDown). Obtain it from ARSession.viewRotationAngle.
