<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/GroundingShadowComponent/init(castsShadow:receivesShadow:fadeBehaviorNearPhysicalObjects:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation24GroundingShadowComponentV05castsD008receivesD031fadeBehaviorNearPhysicalObjectsACSb_SbAC04FadeijkL0Otcfc"
  },
  "title" : "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.

```
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.

---

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)