---
title: "init(position:target:up:)"
framework: spatial
role: symbol
role_heading: Initializer
path: "spatial/rotation3dfloat/init(position:target:up:)"
---

# init(position:target:up:)

Returns a rotation that’s the look at direction from the eye position to the target.

## Declaration

```swift
init(position: Point3DFloat = Point3DFloat(x: 0, y: 0, z: 0), target: Point3DFloat, up: Vector3DFloat = Vector3DFloat(x: 0, y: 1, z: 0))
```

## Parameters

- `position`: The eye position.
- `target`: The point that the rotation looks at.
- `up`: The up direction.

## Discussion

Discussion note: This function creates a rotation where +z is forward.
