---
title: "init(position:extents:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/portalcomponent/volume/init(position:extents:)"
---

# init(position:extents:)

Creates a volume with the given center position and extents.

## Declaration

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

## Parameters

- `position`: The center position of the volume in portal-local space. Defaults to .zero.
- `extents`: The size of the volume (width, height, depth) in portal-local space.
