---
title: "init(strength:restDistance:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/radialforceeffect/init(strength:restdistance:)"
---

# init(strength:restDistance:)

Creates a radial force effect.

## Declaration

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