An entity that produces an omnidirectional light for virtual objects.


class PointLight : Entity


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 cameraMode property set to ARView.CameraMode.nonAR).

The point light is an omnidirectional light that illuminates all the virtual content within a configurable radius from the light. You can configure the light’s color and intensity.


Creating a Point Light


Creates a new point light entity.

func clone(recursive: Bool) -> Self

Duplicates a point light entity to create a new point light entity.

Identifying a Point Light

var id: ObjectIdentifier

The stable identity of the entity associated with self.

var id: UInt64

The stable identity of the point light.

typealias PointLight.ID

A type of unique identifier used for a point light.

Configuring the Point Light

var light: PointLightComponent

A point light component for the entity.

struct PointLightComponent

A component that defines a point light source.

protocol HasPointLight

An interface that defines a point light source component.

Loading a Stored Entity

Stored Entities

Manage entities stored as assets on disk.

Positioning Entities in Space

Finding the Nearest Anchor

Calculating the Collision Shape

Describing the Light

See Also

Cameras and Lighting

class PerspectiveCamera

A virtual camera that establishes the rendering perspective.

class DirectionalLight

An entity that casts a virtual light in a particular direction.

class SpotLight

An entity that illuminates virtual content in a cone-shaped volume.