<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLCamera/focalLength",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLCamera(py)focalLength"
  },
  "title" : "focalLength"
}
-->

# focalLength

The focal length, in millimeters, of the camera’s simulated lens.

```
var focalLength: Float { get set }
```

## Discussion

In a physically based camera, field of view is based on the focal length of the lens and the vertical aperture of the imaging surface (film or sensor). Changing the [`focalLength`](/documentation/ModelIO/MDLCamera/focalLength) or [`sensorVerticalAperture`](/documentation/ModelIO/MDLCamera/sensorVerticalAperture) property updates the [`fieldOfView`](/documentation/ModelIO/MDLCamera/fieldOfView) property to the corresponding value, and vice versa.

The default focal length is 50mm, corresponding to a field of view of 54 degrees, and vertical sensor aperture of 24mm.

---

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)