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

# orientation(relativeTo:)

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

## Declaration

```swift
@MainActor func orientation(relativeTo referenceEntity: Entity?) -> simd_quatf?
```

## Parameters

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