<!--
{
  "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/ForceEffect/init(effect:strengthScale:spatialFalloff:timedFalloff:position:orientation:mask:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation11ForceEffectV6effect13strengthScale14spatialFalloff05timedI08position11orientation4maskACyxGx_SdAA07SpatialcI0VSgAA05TimedcI0VSgs5SIMD3VySfGSo10simd_quatfaAA14CollisionGroupVtcfc"
  },
  "title" : "init(effect:strengthScale:spatialFalloff:timedFalloff:position:orientation:mask:)"
}
-->

# init(effect:strengthScale:spatialFalloff:timedFalloff:position:orientation:mask:)

Creates a ForceEffect struct.

```
init(effect: ForceEffectType, strengthScale: Double = 1.0, spatialFalloff: SpatialForceFalloff? = nil, timedFalloff: TimedForceFalloff? = nil, position: SIMD3<Float> = SIMD3<Float>(0, 0, 0), orientation: simd_quatf = simd_quaternion(0, 0, 0, 1), mask: CollisionGroup = .all)
```

## Parameters

`effect`

Effect specific parameters.

`strengthScale`

Scales the overall strength of the effect.

`spatialFalloff`

The falloff function parameters used to attenuate the force based on distance from the effect origin.

`timedFalloff`

The falloff function parameters used to attenuate the force based on time.

`position`

The position  of the effect relative to the effect entity’s transform.

`orientation`

The orientation of the effect relative to the effect entity’s transform.

`mask`

The mask used to select which groups of rigid bodies the effect should be applied to.

---

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)