<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GroupActivities",
  "identifier" : "/documentation/GroupActivities/SpatialTemplateElementPosition",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Group Activities"
    ],
    "preciseIdentifier" : "s:15GroupActivities30SpatialTemplateElementPositionV"
  },
  "title" : "SpatialTemplateElementPosition"
}
-->

# SpatialTemplateElementPosition

A type that defines the position of an element in a spatial template.

```
struct SpatialTemplateElementPosition
```

## Overview

Use the `SpatialTemplateElementPosition` type to specify the position
of an element along the x- and z-axes in the shared coordinate space.
You place elements relative to the app’s content, which sits at the
origin of the coordinate space. Specify distances in meters. The following
example positions two participants one meter away from the app’s
content, and on opposite sides of it:

```
struct BasicTemplate: SpatialTemplate {
    var elements: [any SpatialTemplateElement] = [
        .seat(position: .app.offsetBy(x: 0, z: 1)),
        .seat(position: .app.offsetBy(x: 0, z: -1)),
    ]
}
```

## Topics

### Getting the app’s position

[`static var app: SpatialTemplateElementPosition`](/documentation/GroupActivities/SpatialTemplateElementPosition/app)

The position of the app’s content in the shared coordinate space.

### Modifying a position

[`func offsetBy(x: Double, z: Double) -> SpatialTemplateElementPosition`](/documentation/GroupActivities/SpatialTemplateElementPosition/offsetBy(x:z:))

Returns a new position at the specified distance from the origin
of the shared coordinate space.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)