---
title: "position(relativeTo:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/geometricpin/position(relativeto:)"
---

# position(relativeTo:)

Calculates and returns the current position of the pin relative to a reference entity, adjusted by the optional offset position.

## Declaration

```swift
@MainActor func position(relativeTo referenceEntity: Entity?) -> SIMD3<Float>?
```

## Parameters

- `referenceEntity`: Reference Entity which defines the frame of reference for the returned position. Can be nil, which is equivalent to “world space”.
