---
title: zDistance
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/pencilhoverpose/zdistance
---

# zDistance

The normalized distance between the screen and a hovering Apple Pencil.

## Declaration

```swift
let zDistance: CGFloat
```

## Discussion

Discussion This value is 1 at the maximum distance from the screen and approaches 0 as the Apple Pencil gets closer to the screen.

## See Also

### Getting the hover characteristics

- [altitude](swiftui/pencilhoverpose/altitude.md)
- [anchor](swiftui/pencilhoverpose/anchor.md)
- [azimuth](swiftui/pencilhoverpose/azimuth.md)
- [location](swiftui/pencilhoverpose/location.md)
- [roll](swiftui/pencilhoverpose/roll.md)
