An entity that casts a virtual light in a particular direction.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- Xcode 11.0+
During an AR session, RealityKit automatically lights your virtual objects to match real-world lighting. You can also explicitly add virtual lights that act upon your virtual content. This is typically most useful outside of an AR session (with the view’s
camera property set to
A directional light uniformly casts light along its z-axis—specifically, along
(0, 0, -1). Use the light’s
look(at: method to aim the light in a particular direction.
You can configure the light’s color and intensity. You can also control how or if it casts a shadow.