<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PortalComponent/Volume/init(position:extents:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15PortalComponentV6VolumeV8position7extentsAEs5SIMD3VySfG_AJtcfc"
  },
  "title" : "init(position:extents:)"
}
-->

# init(position:extents:)

Creates a volume with the given center position and extents.

```
init(position: SIMD3<Float> = .zero, extents: SIMD3<Float>)
```

## Parameters

`position`

The center of the volume in portal-local space, in meters. Defaults to `.zero`.

`extents`

The full lengths (width, height, depth) of the volume in portal-local space, in meters.

---

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)