---
title: zFar
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnlight/zfar
---

# zFar

The maximum distance between the light and a visible surface for casting shadows.

## Declaration

```swift
var zFar: CGFloat { get set }
```

## Discussion

Discussion A spotlight casts shadows if its castsShadow property is true. If a surface is farther from the light than this distance, shadows are not cast against the surface. The default value is 100.0. You can animate changes to this property’s value. See Animating SceneKit Content.

## See Also

### Managing Shadows Cast by the Light

- [castsShadow](scenekit/scnlight/castsshadow.md)
- [shadowRadius](scenekit/scnlight/shadowradius.md)
- [shadowColor](scenekit/scnlight/shadowcolor.md)
- [shadowMapSize](scenekit/scnlight/shadowmapsize.md)
- [shadowSampleCount](scenekit/scnlight/shadowsamplecount.md)
- [shadowMode](scenekit/scnlight/shadowmode.md)
- [SCNShadowMode](scenekit/scnshadowmode.md)
- [shadowBias](scenekit/scnlight/shadowbias.md)
- [orthographicScale](scenekit/scnlight/orthographicscale.md)
- [zNear](scenekit/scnlight/znear.md)
