---
title: SpatialTemplateElementPosition
framework: groupactivities
role: symbol
role_heading: Structure
path: groupactivities/spatialtemplateelementposition
---

# SpatialTemplateElementPosition

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

## Declaration

```swift
struct SpatialTemplateElementPosition
```

## Overview

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

- [app](groupactivities/spatialtemplateelementposition/app.md)

### Modifying a position

- [offsetBy(x:z:)](groupactivities/spatialtemplateelementposition/offsetby(x:z:).md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Custom spatial templates

- [Building a guessing game for visionOS](groupactivities/building-a-guessing-game-for-visionos.md)
- [SpatialTemplate](groupactivities/spatialtemplate.md)
- [SpatialTemplatePreference](groupactivities/spatialtemplatepreference.md)
- [SpatialTemplateSeatElement](groupactivities/spatialtemplateseatelement.md)
- [SpatialTemplateElement](groupactivities/spatialtemplateelement.md)
- [SpatialTemplateElementDirection](groupactivities/spatialtemplateelementdirection.md)
- [SpatialTemplateRole](groupactivities/spatialtemplaterole.md)
