Contents

zNear

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

Declaration

var zNear: CGFloat { get set }

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