---
title: "convert(vector:from:to:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/realitycoordinatespaceconverting/convert(vector:from:to:)"
---

# convert(vector:from:to:)

Converts a 3D vector from a RealityKit coordinate space to one in a SwiftUI coordinate space.

## Declaration

```swift
func convert(vector: SIMD3<Float>, from realitySpace: some RealityCoordinateSpace, to space: some CoordinateSpaceProtocol) -> Vector3D
```
