<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SK3DNode/unprojectPoint(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SK3DNode(im)unprojectPoint:"
  },
  "title" : "unprojectPoint(_:)"
}
-->

# unprojectPoint(_:)

Unprojects a point from the SpriteKit node’s 2D viewport coordinate system to the 3D world coordinate system of the SceneKit scene.

```
func unprojectPoint(_ point: vector_float3) -> vector_float3
```

## Parameters

`point`

A point in the SpriteKit node’s coordinate system.

## Return Value

The corresponding point in the world coordinate system of the SceneKit scene.

## Discussion

The z-coordinate of the `point` parameter describes the depth at which to unproject the point relative to the near and far clipping planes of the viewing frustum (defined by the [`SK3DNode`](/documentation/SpriteKit/SK3DNode) property). Unprojecting a point whose z-coordinate is `0.0` returns a point on the near clipping plane; unprojecting a point whose z-coordinate is `1.0` returns a point on the far clipping plane.

A point in the SpriteKit node’s 2D viewport coordinate space can refer to any point along a line segment in the 3D SceneKit coordinate space. To test for scene contents along this line—for example, to find the geometry corresponding to a touch event—use the [`SK3DNode`](/documentation/SpriteKit/SK3DNode) method.

The following Swift code shows how you might convert the location of an iOS touch event inside an [`SK3DNode`](/documentation/SpriteKit/SK3DNode), `node`, to the 3D coordinates within its SceneKit scene. The resulting value, `sceneKitCoordinates`, is given a `z` of `0.5`, meaning that the coordinate is midway between the near and far clipping planes. You could use this value to set the position of an object within the SceneKit scene.

```swift
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
    guard let touch = touches.first else {
        return
    }
    
    let location = touch.location(in: node)
    let scale = Float(UIScreen.main.scale)
    
    let sceneKitCoordinates = node.unprojectPoint(vector_float3(Float(location.x) * scale,
                                                                Float(location.y) * scale,
                                                                0.5))
}
```

---

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)