<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/realityViewCameraControls(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP012_RealityKit_aB0E07realityC14CameraControlsyQr0D10Foundation0gH0VF"
  },
  "title" : "realityViewCameraControls(_:)"
}
-->

# realityViewCameraControls(_:)

Adds gestures that control the position and direction of a virtual camera.

```
@MainActor @preconcurrency func realityViewCameraControls(_ controls: CameraControls) -> some View
```

## Discussion

You can use a drag gesture from a mouse, trackpad,
or screen touches with iOS and iPadOS devices to
`.tilt`, `.pan`, `.orbit`, or `.dolly` a virtual
camera.

---

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)