---
title: "init(castsShadow:receivesShadow:fadeBehaviorNearPhysicalObjects:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/groundingshadowcomponent/init(castsshadow:receivesshadow:fadebehaviornearphysicalobjects:)"
---

# init(castsShadow:receivesShadow:fadeBehaviorNearPhysicalObjects:)

Creates a grounding shadow component by configuring whether its entity receives shadows and its fade behavior near physical objects.

## Declaration

```swift
init(castsShadow: Bool, receivesShadow: Bool, fadeBehaviorNearPhysicalObjects: GroundingShadowComponent.FadeBehaviorNearPhysicalObjects)
```

## Parameters

- `castsShadow`: A Boolean value that indicates whether the component’s entity casts a shadow on the environment and other model entities.
- `receivesShadow`: A Boolean value that indicates whether the component’s entity receives shadows from other model entities.
- `fadeBehaviorNearPhysicalObjects`: A fade behavior for the entity’s shadow when the entity is near physical objects.
