<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelRenderer/Camera/init(position:rotation:projection:viewportArrayIndex:renderTargetArrayIndex:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer08LowLevelC0C6CameraV8position8rotation10projection18viewportArrayIndex012renderTargetkL0AEs5SIMD3VySfG_So10simd_quatfaAE10ProjectionVS2itcfc"
  },
  "title" : "init(position:rotation:projection:viewportArrayIndex:renderTargetArrayIndex:)"
}
-->

# init(position:rotation:projection:viewportArrayIndex:renderTargetArrayIndex:)

Creates a camera with the given position, rotation, projection, and viewport/render-target indices.

```
init(position: SIMD3<Float>, rotation: simd_quatf, projection: LowLevelRenderer.Camera.Projection = .custom(matrix: .init(diagonal: .one)), viewportArrayIndex: Int = 0, renderTargetArrayIndex: Int = 0)
```

## Parameters

`position`

The position of the camera in world space. Defaults to the origin.

`rotation`

The orientation of the camera. Defaults to identity.

`projection`

The projection transform for this camera. Defaults to a custom identity matrix.

`viewportArrayIndex`

The index into the `Output.viewports` and `Output.scissorRects` arrays for this camera. Defaults to `0`.

`renderTargetArrayIndex`

The index into the render target texture array slice for this camera. Defaults to `0`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)