<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/SpotLightComponent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation18SpotLightComponentV"
  },
  "title" : "SpotLightComponent"
}
-->

# SpotLightComponent

A component that defines a spotlight source.

```
struct SpotLightComponent
```

## Overview

A spotlight illuminates a cone-shaped volume in the entity’s local forward direction
along the z-axis’s negative direction, or `[0.0, 0.0, -1.0]`.
Change the a spotlight’s direction with the `Entity/orientation` or
[`look(at:from:upVector:relativeTo:)`](/documentation/RealityKit/HasTransform/look(at:from:upVector:relativeTo:)) method,
of the [`Entity`](/documentation/RealityKit/Entity) with a spotlight component.

The light’s [`innerAngleInDegrees`](/documentation/RealityKit/SpotLightComponent/innerAngleInDegrees) and [`outerAngleInDegrees`](/documentation/RealityKit/SpotLightComponent/outerAngleInDegrees)
reflect the size of the light’s cone relative to the entity’s forward direction.
The light is at full intensity between `0` degrees and [`innerAngleInDegrees`](/documentation/RealityKit/SpotLightComponent/innerAngleInDegrees).
RealityKit attenuates the light’s intensity between the inner angle and the outer angle.
The spotlight’s intensity is `0.0` beyond the outer angle.

> Tip: Turn on shadows for a spotlight by adding the ``doc://com.apple.RealityKit/documentation/RealityKit/SpotLightComponent/Shadow`` component
> to an entity that has a `SpotLightComponent`.

The following table shows some real-world scenarios, to better explain how
you can use [`intensity`](/documentation/RealityKit/SpotLightComponent/intensity) to control the brightness of the light in lumens,
and [`attenuationRadius`](/documentation/RealityKit/SpotLightComponent/attenuationRadius) to control how the level of brightness
diminishes with distance from the light source:

|Scenario                    |Approximate Lumens   |Attenuation Radius|Description                                       |
|----------------------------|---------------------|------------------|--------------------------------------------------|
|Small Accent Spotlight      |100-200 lumens       |5-10 meters       |Highlights small objects or artwork               |
|LED flashlight              |300-600 lumens       |50-70 meters      |Beams a long distance illumination                |
|Theatrical Spotlight        |500-1,000 lumens     |20-40 meters      |Focuses attention to performers on a stage        |
|Outdoor Security Spotlight  |1,000-2,000 lumens   |20-30 meters      |Brightly illuminates specific outdoor areas       |
|Film/TV Production Spotlight|5,000-10,000 lumens  |50-100 meters     |Provides focused, high-intensity lighting for sets|
|Large-Scale Event Spotlight |50,000-100,000 lumens|200-500 meters    |Lights large outdoor events or concerts           |

## Dynamic light capacity

On older hardware, only a limited number of dynamic lights can affect each object.
Devices that support `MTLGPUFamily.apple6` or later lift this limit.

Excessive use of dynamic lights may contribute to user-noticeable frame drops and
can cause the device to heat up in graphically demanding situations. Both the number
of lights and each light’s coverage affect performance, so use properties like
[`attenuationRadius`](/documentation/RealityKit/SpotLightComponent/attenuationRadius) to keep a light’s influence no larger than your scene needs.
Monitor the thermal state and reduce usage as a mitigation, if necessary.

Because this behavior varies by device, verify your scene’s lighting on the oldest
hardware you support. You can check for this support at runtime with
`MTLDevice.supportsFamily(.apple6)`.

## Topics

### Configuring the spotlight

[`intensity`](/documentation/RealityKit/SpotLightComponent/intensity)

The intensity of the spotlight measured in lumen.

[`innerAngleInDegrees`](/documentation/RealityKit/SpotLightComponent/innerAngleInDegrees)

The inner angle of the spotlight in degrees.

[`outerAngleInDegrees`](/documentation/RealityKit/SpotLightComponent/outerAngleInDegrees)

The outer angle of the spotlight in degrees.

[`attenuationRadius`](/documentation/RealityKit/SpotLightComponent/attenuationRadius)

The distance from the light source where its intensity reaches zero.

[`attenuationFalloffExponent`](/documentation/RealityKit/SpotLightComponent/attenuationFalloffExponent)

The exponent value for the light’s intensity falloff-transition curve.

### Supporting types

[`Color`](/documentation/RealityKit/SpotLightComponent/Color-swift.typealias)

A platform-specific type used to define color for a spotlight.

### Specifying the render layers

[`layers`](/documentation/RealityKit/SpotLightComponent/layers)

The layers this light illuminates.

### Defining the light contribution

[`SurroundingsLight`](/documentation/RealityKit/SpotLightComponent/SurroundingsLight)

A component that specifies that the spot light illuminates the physical and immersive environment.

[`ProjectiveTexture`](/documentation/RealityKit/SpotLightComponent/ProjectiveTexture)

A component that specifies a map of a projective texture or cookie light to use for shadow mapping.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Copyable`](/documentation/Swift/Copyable)

[`Component`](/documentation/RealityKit/Component)

[`Escapable`](/documentation/Swift/Escapable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)