<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ARView/unproject(_:viewport:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:10RealityKit6ARViewC9unproject_8viewports5SIMD3VySfGSgSo7CGPointV_So6CGRectVtF"
  },
  "title" : "unproject(_:viewport:)"
}
-->

# unproject(_:viewport:)

Maps a 2D point from the pixel coordinate system of a viewport into a 3D
coordinate space. The point lies on this view’s near clipping plane.

```
@MainActor @preconcurrency func unproject(_ point: CGPoint, viewport: CGRect) -> SIMD3<Float>?
```

## Parameters

`point`

A point in `viewport`.

`viewport`

A viewport.

## Return Value

A view-space 3D coordinate.

---

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)