<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GLKit",
  "identifier" : "/documentation/GLKit/GLKMathUnproject(_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:@F@GLKMathUnproject"
  },
  "title" : "GLKMathUnproject(_:_:_:_:_:)"
}
-->

# GLKMathUnproject(_:_:_:_:_:)

Projects a point in view space into object space.

```
func GLKMathUnproject(_ window: GLKVector3, _ model: GLKMatrix4, _ projection: GLKMatrix4, _ viewport: UnsafeMutablePointer<Int32>, _ success: UnsafeMutablePointer<Bool>?) -> GLKVector3
```

## Parameters

`window`

The point in window coordinates.

`model`

A modelview transformation matrix.

`projection`

A projection matrix.

`viewport`

A pointer to an array of four integer values. The first pair of values represent the window coordinates of the viewport’s bottom left corner. The second pair of values represent the width and height of the view port.

`success`

Upon return, contains <doc://com.apple.documentation/documentation/Swift/true> if the function completed successfully, otherwise it contains <doc://com.apple.documentation/documentation/Swift/false>. Pass `NULL` if you do not want error information.

## Return Value

The projected point in object space.

---

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)