<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ModelComponent/boundsMargin",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation14ModelComponentV12boundsMarginSfvp"
  },
  "title" : "boundsMargin"
}
-->

# boundsMargin

A margin applied to an entity’s bounding box that determines object
visibility.

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

## Discussion

When determining which entities are currently visible, RealityKit tests
each entity’s bounding box to see if it overlaps with the camera’s field
of view (also known as the camera’s *frustum*). For efficiency, entities
with a bounding box that don’t overlap the camera’s frustum aren’t
rendered. Use this property to prevent RealityKit from incorrectly
culling entities that use a [`CustomMaterial`](/documentation/RealityKit/CustomMaterial) with a geometry modifier
that moves vertices outside of the entity’s bounding box.

RealityKit adds the value of `boundsMargin` to the bounding box before
determining which entities are visible.

> Note: On visionOS, if a mesh has an incorrect axis-aligned bounding
> box (AABB), you might see pixelated passthrough artifacts on the mesh
> due to inaccurate depth reprojection. Provide a correct AABB for your
> virtual content, or if the mesh is animated by a shader, make the AABB
> more conservative using this property.

---

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)