<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/SpotLightComponent/init(color:intensity:innerAngleInDegrees:outerAngleInDegrees:attenuationRadius:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation18SpotLightComponentV0A3KitE5color9intensity19innerAngleInDegrees05outerjkL017attenuationRadiusACSo7NSColorC_S4ftcfc::OverloadGroup"
  },
  "title" : "init(color:intensity:innerAngleInDegrees:outerAngleInDegrees:attenuationRadius:)"
}
-->

# init(color:intensity:innerAngleInDegrees:outerAngleInDegrees:attenuationRadius:)

Creates a spotlight with the given parameters.

```
init(color: SpotLightComponent.Color = .white, intensity: Float = 6740.94, innerAngleInDegrees: Float = 45.0, outerAngleInDegrees: Float = 60.0, attenuationRadius: Float = 10.0)
```

## Parameters

`color`

The color of the light.

`intensity`

The light’s brightness.

`innerAngleInDegrees`

The angle of the cone that emits light at full intensity, in degrees.

`outerAngleInDegrees`

The angle of the cone beyond which the spotlight’s intensity is zero.

`attenuationRadius`

The distance from the light source where its intensity reaches zero.
Any objects at or beyond this distance do not receive illumination.

---

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)