<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PortalComponent/CrossingMode-swift.enum/volume(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15PortalComponentV12CrossingModeO6volumeyAeC6VolumeVcAEmF"
  },
  "title" : "PortalComponent.CrossingMode.volume(_:)"
}
-->

# PortalComponent.CrossingMode.volume(_:)

Allows contents within the portal to cross a box-shaped boundary.

```
case volume(PortalComponent.Volume)
```

## Parameters

`volume`

A [`PortalComponent.Volume`](/documentation/RealityKit/PortalComponent/Volume) describing the box’s center and extents
in portal-local space.

## Discussion

Entities inside the portal world that have a [`PortalCrossingComponent`](/documentation/RealityKit/PortalCrossingComponent) cross the
faces of the box. Parts of a crossing entity inside the volume render as portal
content, parts outside render in the host scene.

Use this case for room-sized portals and other bounded portal spaces. For portals
where the box should enclose the portal surface,
[`enclosingBox(depth:)`](/documentation/RealityKit/PortalComponent/BoundaryStyle/enclosingBox(depth:)) is a convenient way to configure this case
alongside the matching [`PortalComponent.ClippingMode.volume(_:)`](/documentation/RealityKit/PortalComponent/ClippingMode-swift.enum/volume(_:)).

---

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)