---
title: "unproject(_:ontoPlane:relativeToCamera:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/arview/unproject(_:ontoplane:relativetocamera:)"
---

# unproject(_:ontoPlane:relativeToCamera:)

Unproject a 2D point from the view onto a plane in 3D world coordinates.

## Declaration

```swift
@MainActor @preconcurrency func unproject(_ point: CGPoint, ontoPlane planeTransform: float4x4, relativeToCamera: Bool) -> SIMD3<Float>?
```

## Parameters

- `point`: A point in the view’s coordinate system.
- `planeTransform`: The transform used to define the coordinate system of the plane. The coordinate system’s positive y-axis is assumed to be the normal of the plane.
- `relativeToCamera`: If the plane transform is relative to camera space or world space.

## Return Value

Return Value 3D position in world coordinates or nil if unprojection is not possible.

## Discussion

Discussion A 2D point in the view’s coordinate space can refer to any point along a line segment in the 3D coordinate space. Unprojecting gets the 3D position of the point along this line segment that intersects the provided plane.

## See Also

### Mapping between coordinate spaces

- [project(_:)](realitykit/arview/project(_:).md)
- [unproject(_:ontoPlane:)](realitykit/arview/unproject(_:ontoplane:).md)
- [unproject(_:viewport:)](realitykit/arview/unproject(_:viewport:).md)
- [ray(through:)](realitykit/arview/ray(through:).md)
