<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNLevelOfDetail/init(geometry:worldSpaceDistance:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNLevelOfDetail(cm)levelOfDetailWithGeometry:worldSpaceDistance:"
  },
  "title" : "init(geometry:worldSpaceDistance:)"
}
-->

# init(geometry:worldSpaceDistance:)

Creates a level of detail with the specified geometry and threshold camera distance.

```
convenience init(geometry: SCNGeometry?, worldSpaceDistance distance: CGFloat)
```

## Parameters

`geometry`

The geometry to render for this level of detail, or `nil` if SceneKit should render no geometry at this level of detail.

`distance`

The minimum distance from the current point of view for this level of detail to appear.

## Return Value

A level-of-detail object. You associate levels of detail with a [`SCNGeometry`](/documentation/SceneKit/SCNGeometry) object using its [`levelsOfDetail`](/documentation/SceneKit/SCNGeometry/levelsOfDetail) property.

## Discussion

When rendering a geometry with associated levels of detail, SceneKit calculates the distance from the current point of view to the geometry’s parent node, then renders the geometry for the [`SCNLevelOfDetail`](/documentation/SceneKit/SCNLevelOfDetail) object with the smallest `distance` parameter greater than that distance.

If you pass `nil` for the geometry parameter, SceneKit renders no geometry for the level of detail. Creating a level-of-detail object with no geometry allows you to skip rendering costs entirely for an object when it would appear very far away or very small.

---

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)