---
title: SpatialForceFalloff
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/spatialforcefalloff
---

# SpatialForceFalloff

A type that modulates the force strength based on the distance of rigid bodies.

## Declaration

```swift
struct SpatialForceFalloff
```

## Overview

Overview Forces applied to rigid bodies near the effect’s origin have the largest strength and gradually decay to zero when approaching the boundary of ForceEffectBounds. rate controls how fast the force strength decays. Under the hood the rate is an exponent of the normalized distance over the spatial bounds. For example when the rate is 0, the falloff coefficient (i.e. distance raised to the power of 0) is constantly 1, and that implies no decay or falloff the force strength. let noFalloff = SpatialForceFalloff(bounds: .sphere(radius: 10), rate: 0) As another example, you can set rate to 1 to decay the force strength linearly. let linearFalloff = SpatialForceFalloff(bounds: .sphere(radius: 10), rate: 1)

## Topics

### Initializers

- [init(bounds:rate:distanceOffset:)](realitykit/spatialforcefalloff/init(bounds:rate:distanceoffset:).md)

### Instance Properties

- [bounds](realitykit/spatialforcefalloff/bounds.md)
- [distanceOffset](realitykit/spatialforcefalloff/distanceoffset.md)
- [rate](realitykit/spatialforcefalloff/rate.md)

## See Also

### Force effect constraints

- [ForceEffectBounds](realitykit/forceeffectbounds.md)
- [TimedForceFalloff](realitykit/timedforcefalloff.md)
