---
title: "init(castsShadow:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/dynamiclightshadowcomponent/init(castsshadow:)"
---

# init(castsShadow:)

Creates a dynamic light shadow component.

## Declaration

```swift
init(castsShadow: Bool)
```

## Parameters

- `castsShadow`: A Boolean value that indicates whether an entity with the component casts a shadow.

## Discussion

Discussion By default, the component makes an entity to stop casting shadows from dynamic lights.
