<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/RadialForceEffect/init(strength:restDistance:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation17RadialForceEffectV8strength12restDistanceACSd_Sdtcfc"
  },
  "title" : "init(strength:restDistance:)"
}
-->

# init(strength:restDistance:)

Creates a radial force effect.

```
init(strength: Double, restDistance: Double)
```

## Parameters

`strength`

The magnitude of the spring effect—a larger strength simulates a stiffer spring.

`restDistance`

Objects at this distance will receive zero radial force.
Otherwise they will gravitate toward this distance along the radial direction.
Objects will be attracted to the origin directly if this property is set to zero.

---

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)