---
title: zNear
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnlight/znear
---

# zNear

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

## Declaration

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

## Discussion

Discussion A spotlight casts shadows if its castsShadow property is true. If a surface is closer to the light than this distance, shadows are not cast against the surface. The default value is 1.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)
- [zFar](scenekit/scnlight/zfar.md)
