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

# GLKMatrix4MakeLookAt(_:_:_:_:_:_:_:_:_:)

Returns a `4x4` matrix that transforms world coordinates to eye coordinates.

```
func GLKMatrix4MakeLookAt(_ eyeX: Float, _ eyeY: Float, _ eyeZ: Float, _ centerX: Float, _ centerY: Float, _ centerZ: Float, _ upX: Float, _ upY: Float, _ upZ: Float) -> GLKMatrix4
```

## Parameters

`eyeX`

The `x` coordinate of the eye position.

`eyeY`

The `y` coordinate of the eye position.

`eyeZ`

The `z` coordinate of the point position.

`centerX`

The `x` coordinate of the point being looked at.

`centerY`

The `y` coordinate of the point being looked at.

`centerZ`

The `z` coordinate of the point being looked at.

`upX`

The `x` coordinate of the camera’s up vector.

`upY`

The `y` coordinate of the camera’s up vector.

`upZ`

The `z` coordinate of the camera’s up vector.

## Return Value

A newly initialized view matrix.

## Discussion

This function creates a matrix in a way similar to the `gluLookAt` function previously provided in OpenGL ES 1.1.

---

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)